Support » Plugins » [Plugin: Google Analytics for WordPress] adsense-track.js wrong path

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi. I am having the same problem. It’d be great if this were fixed! Thanks.

    I have the same issue with the adsense-track.js file. I actually, in my case the reference to the file changes. My permalinks are set up so that each post URL ends with a slash i.e. like a directory. So the adsense-track.js file path is always the full post URL plus adsense-track.js.

    For example: http://www.site.com/post-slug/adsense-track.js

    Hi Guys!
    I also have the same problem, have you found any solution for it?

    Best regards,
    Joel

    Got it!

    This function (line 366 on googleanalytics.php):

    function track_adsense() {
    	echo("\t<script src=\"".$pluginpath."adsense-track.js\" type=\"text/javascript\"></script>\n");
    		}

    Is using $pluginpath, but not declaring it global. If I modify it like so:

    function track_adsense() {
    	global $pluginpath;
    	echo("\t<script src=\"".$pluginpath."adsense-track.js\" type=\"text/javascript\"></script>\n");
    		}

    It works. At least on my install… Joost?

    Should be fixed in version 2.5.5, the forgotten global was indeed the issue, as well as the fact that multiple plugins were using the $pluginpath variable, which caused the directory to be wrong sometimes.

    Hi Joost,
    Now I have the same problem (only from v. 2.7, not before), but I don’t see the file named adsense-track.js

    Thanks and… Merry Xmas 🙂

    Max

    hogudo: this shouldn’t occur anymore as the file is no longer needed… Have you updated to the last version of the plugin?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Google Analytics for WordPress] adsense-track.js wrong path’ is closed to new replies.