For pagespeed to do experiment tracking, it needs to be able to insert
_gaq.push(['_setCustomVar', 1, 'ExperimentState', 'Experiment: 1']);
for one side of the experiment and _gaq.push(['_setCustomVar', 1,
'ExperimentState', 'Experiment: 2']); for the other side. Otherwise
you won't be able to tell them apart in Google Analytics.
PageSpeed currently doesn't recognize
stats.g.doubleclick.net/dc.js as
a synonym for
google-analytics.com/ga.js, but it should. I've filed a
bug
https://github.com/pagespeed/mod_pagespeed/issues/1338 , and I
have a patch out for review.
Even with this fixed, though, it's still not going to work with your
script because yours starts with:
_gaq=[ ... ]
To be interoperable, gs.js snippet code should instead start with:
var _gaq = _gaq || [];
This means that whichever snippet comes first, settings from one won't
override the other. If you have:
script1: _gaq.push(["_setSiteSpeedSampleRate",100])
script2: _gaq=[["_setAccount","UA-XXXXXXX-Y"]]
Then you'll lose your _setSiteSpeedSampleRate, while if you have:
script1: var _gaq=_gaq || [];_gaq.push(["_setSiteSpeedSampleRate",100])
script2: var _gaq=_gaq || [];_gaq=[["_setAccount","UA-XXXXXXX-Y"]]
You'll get both settings into _gaq.
Can we file a bug with Xenforo to switch from
_gaq=[["_setAccount","UA-XXXXXXX-Y"],["_setSiteSpeedSampleRate",100]];
to
var _gaq=_gaq ||
[];_gaq.push(["_setAccount","UA-XXXXXXX-Y"]);_gaq.push(["_setSiteSpeedSampleRate",100]);
Is
https://xenforo.com/community/forums/xenforo-questions-and-support.25/
the right place to do that?
Jeff
> --
> You received this message because you are subscribed to the Google Groups
> "ngx-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ngx-pagespeed-di...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/ngx-pagespeed-discuss.
> For more options, visit
https://groups.google.com/d/optout.