WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
CrawlTrack and W3TC: how to use them together? (10 posts)

  1. Galerio
    Member
    Posted 2 years ago #

    I have just installed CrawlTrack (http://www.crawltrack.net) to tack bots and other things on my site. It uses a php script that must be written in index.php of wordpress.
    But when I use W3TC with Page Cache Enhanced, the index.php is skipped and the html cached page is directly served.

    I'm trying a solution to continue to use Page Cache Enhanced but also to track bots with CrawlTrack.

    Any ideas?

    I know that I can use the Page Cache normal method that uses php instead of htaccess, but the best is to use the Enhanced method.

    Maybe I can put inside htaccess the line:

    AddType application/x-httpd-php .html
    AddType application/x-httpd-php .htm

    So every html is read as php, but how to put the php code inside the cached html files? The code must be inside the tags <?php and ?> so, how to mantain them when the page is processed by the plugin?

    Thanks

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. cyonite
    Member
    Posted 2 years ago #

    If you haven't solved it already perhaps fragmented caching is a solution?
    Find info on it in the plugin FAQ inside the plugin.

  3. Galerio
    Member
    Posted 2 years ago #

    Thanks, it could be the solution, but I have tryed and get error:
    Parse error: syntax error, unexpected '<' in /home/siti/htdocs/index.php on line 2

    This is my index.php:

    <?php
    <!--MFUNC  -->
    $crawltsite=1;
    require_once("/home/siti/htdocs/track/crawltrack.php");
    <!--/mfunc -->
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

    So, I don't know how to implement it. Can you help me?

  4. cyonite
    Member
    Posted 2 years ago #

    You cant surround the whole thing with <?php since it aint PHP code "yet". Its an HTML comment.
    ?>
    <!-- ->
    PHP code goes here
    <!---/
    <?php

    You find some discussion here: http://wordpress.org/support/topic/invalid-mfunc-tag-syntax?replies=11#post-2618104

  5. Galerio
    Member
    Posted 2 years ago #

    Seems it doesn't function... I get my function displayed at the top of the page as a plain text! I try other method.

  6. ysekand
    Member
    Posted 2 years ago #

    Why don't you try SEO Crawlytics plugin? http://www.elevatelocal.co.uk/seo-crawlytics

    Disclaimer: I built it.

  7. Galerio
    Member
    Posted 2 years ago #

    Thanks, have you tried it with W3TC and pages cached with "disk advanced" method?

  8. ysekand
    Member
    Posted 2 years ago #

    It should work fine. Let me know how you get on.

  9. Galerio
    Member
    Posted 2 years ago #

    I tryed your plugin but it can detect only known bot that you have manually added to config. What I need is something that shows me statistics about every bot is visiting my site, known and unknown new bot.

  10. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    I'm not sure what I can offer here since I don't know much about CrawlTrack.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic