Comment 9 for bug 578713

Revision history for this message
Rance Lucifinil (lambo) wrote : Re: [Bug 578713] Re: Autoptimize breaks Google Analytics

Please check the following new Google analytics codes which will be put in
<head></head>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1447202-8']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type =
'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
  })();

</script>

Yes, you can change your ID as your wish.

I will try later once you finished this update.

2010/6/15 Emilio <email address hidden>

> For a quick way to disable moving analytics scripts, check
> classes/autoptimizeScripts.php.
>
> On $dontmove, add 'pieces' for each script tag that needs to stay in
> place. On $domove, remove the current analytics piece(s) (it's just
> jaJsHost if I recall correctly)
>
> By the way, could you provide me with an example analytics code (you can
> change user IDs and that if you wish)? Just in case it changed and I
> need to add new rules for it on the plugin code :)
>
> Looking forward to hearing from you,
>
> Emilio
>
> --
> Autoptimize breaks Google Analytics
> https://bugs.launchpad.net/bugs/578713
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Autoptimize: Invalid
>
> Bug description:
> I tried your Autoptimize plugin for wordpress. blog.iobit.com
>
> Once I installed your plugin, it really worked, increased speed for opening
> my pages.
>
> However, since then, there is no Google Analytics data any more!
>
> two hours later, I found this issue, so I deleted your plugin at
> background.
>
> 2 hours later again, there is still no analytics data. I entered my server,
> found that there are some files of Autoptimize still there under cache
> folder. Then I deleted this folder completely.
>
> 1 hour later again, there is till no analytics data. I don't know where I
> didn't delete.
>
> During these period, I didn't edit any code of my blog, just installed and
> uninstalled your plugin.
>
> Is there anyway you can make my blog google analytics normal?
>
> I have already deleted Autoptimize files at background and cache folder at
> wp-content/
>
> Many thanks
>
> --
> Leonard Lambo
> GM Department
>
> IObit.com
> Http://blog.iobit.com
>
> Tel:+86-13402886117
> Email:<email address hidden> <Email%<email address hidden>>
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/autoptimize/+bug/578713/+subscribe
>

--
Leonard Lambo
GM Department

IObit.com
Http://blog.iobit.com

Tel:+86-13402886117
Email:<email address hidden> <Email%<email address hidden>>