• I have just installed CrawlTrack (https://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

    https://www.ads-software.com/extend/plugins/w3-total-cache/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andreas

    (@andreasnrb)

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

    Thread Starter Galerio

    (@galerio)

    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?

    Andreas

    (@andreasnrb)

    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: https://www.ads-software.com/support/topic/invalid-mfunc-tag-syntax?replies=11#post-2618104

    Thread Starter Galerio

    (@galerio)

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

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

    Disclaimer: I built it.

    Thread Starter Galerio

    (@galerio)

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

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

    Thread Starter Galerio

    (@galerio)

    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.

    Plugin Contributor Frederick Townes

    (@fredericktownes)

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: W3 Total Cache] CrawlTrack and W3TC: how to use them together?’ is closed to new replies.