Topic on Project:Support desk

Extension:Google Analytics Integration - Usage Instructions Unfinished and Unclear

5
Eckre~mediawikiwiki (talkcontribs)

https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration

I am familiar and have used this extension for years. Trying to upgrade to the new "enhanced" code.

The Installation Instructions say to: 1. Download. -Check 2. Add following code to LocalSettings (replacing XXX with my #) -Check 3. Check Special:Version to see that it installed successfully - Check.

Then the Useage directions say 1. "Create GA account" -Check. 2. "Locate UA number" -Check. Then it lists two lines of code, one for legacy, one for new, then follow installation instructions??!?!?! What good does "locating your UA" and listing two lines of code DO? Inotherwords, what do you do with the line of code? Do you put it in LocalSettings? No, that will break your site. I have no idea what to DO with the code that I've located, and the writer of the usage instructions forgot to say what to do with it either. All I know is GA says the new code isn't working. Help!

This post was posted by Eckre~mediawikiwiki, but signed as Eckre.

Florianschmidtwelzow (talkcontribs)

You copy the UA string and add it as the value of $wgGoogleAnalyticsAccount ;)

Eckre~mediawikiwiki (talkcontribs)

So like this:

"$wgGoogleAnalyticsAccount = var pageTracker = _gat._getTracker("UA-xxxxxxx-x"); "

If that's all it is, the guide should say so.

This post was posted by Eckre~mediawikiwiki, but signed as Eckre.

Eckre~mediawikiwiki (talkcontribs)

That's not it it breaks the site.

What do I do with this line?

var pageTracker = _gat._getTracker("UA-xxxxxxx-x");

This post was posted by Eckre~mediawikiwiki, but signed as Eckre.

Florianschmidtwelzow (talkcontribs)

Just copy the "UA-xxxxxxx-x" string (without ") and paste it as a var to $wgGoogleAnalyticsAccount, e.g. this line in your LocalSettings.php:

$wgGoogleAnalyticsAccount = "UA-xxxxxxx-x";

Reply to "Extension:Google Analytics Integration - Usage Instructions Unfinished and Unclear"