WordPress.org

Ready to get started?Download WordPress

Forums

Blunt GA
[resolved] W3 Total Cache Broke my Analytics (5 posts)

  1. cnbscene
    Member
    Posted 8 months ago #

    I've been using Blunt GA to great effect to track Click to Call events (the only wordpress analytics plugin i could get to work, i tried them all).

    I've been improving my site for SEO purposes and recently installed W3 Total Cache. My site speed improved greatly, but my analytics doesn't work anymore. I'm guessing Minify busted something?

    Any recommendations. I know Joast's Google Analytics has some special handling for W3 Total Cache, but I could never get it to track click to call data.

    Thanks in advance.
    wynlv.com

    http://wordpress.org/plugins/blunt-ga/

  2. Hube2
    Member
    Plugin Author

    Posted 8 months ago #

    When I inspect your site using firebug I see 2 copies of ga.js being loaded. It looks to me like you also have Google Analytics for WordPress by Yoast installed and active. Try deactivating that plugin and maybe removing it from you site.

  3. Hube2
    Member
    Plugin Author

    Posted 8 months ago #

    Also, aside from having 2 copies of GA running on you site.

    There was an update that turned off tracking for logged in users. Here's my guess.

    There is a feature of the plugin that turns off tracking for logged in users. My guess it that the cached version of the page is the version that has GA turned off, likely because you were logged in and looked at the page. This is just a guess.

    Because the page and the code can actually be different and run differently based on several items a caching plugin like total cache is not likely to allow my plugin to work.

    I don't personally use caching plugins because I create a lot of dynamic content that will not work with caching in place and loading dynamic content using AJAX defeats SEO. My philosophy is to build fast loading sites rather than fix poor development with a cache.

  4. cnbscene
    Member
    Posted 8 months ago #

    I disabled minify in W3 Total Cache and both Blunt GA and GA by Yoast are working. I don't know why there are two copies of ga.js on my site. There should be one ga.js for Blunt GA and one analytics.js for Yoast (using universal analytics). I'm just going to live with the minify turned off for now, it doesn't make that huge of a difference on my site.

  5. Hube2
    Member
    Plugin Author

    Posted 8 months ago #

    This actually makes some sense. When you compress JS it puts it all on one line. When you localize a script WP adds the usually unnecessary CDATA tags around it. This could cause this localization to be commented out depending on the browser and that would make the script fail to run.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.