Extension talk:Google Analytics

From mediawiki.org
Latest comment: 12 years ago by Knorrepoes in topic Exclusion of talk pages
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

can't get it to work properly[edit]

Ok...added this extension and I can't get it to work properly. Google analytics works fine with my wordpress blog. On the status I see *Waiting for Data...

Here is what the script code looks like.

On google it is:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-xxxxxxx-2"; urchinTracker(); </script>

While on my site source it is:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">_uacct = "UA-xxxxxxx-2";</script><script type="text/javascript">urchinTracker();</script>

Any ideas? Thanks. Kdewalt 04:18, 2 March 2007 (UTC)Reply

I have updated the code, just moved that line down 2. Update your code and you'll be all set! davec 02:37, 11 April 2007 (UTC)Reply

External References?[edit]

First, please see the Q&As:
http://www.google.com/support/analytics/bin/answer.py?answer=27242
http://www.google.com/support/analytics/bin/answer.py?answer=27246
Google Analytics Best Practices

My question is: how do i do this within the wiki?

Thanks! Davecotter 20:28, 9 April 2007 (UTC)Reply

He replied in email, and his reply was basically "No it doesn't do that, sorry I don't have time to update it."
I took it upon myself to hire someone to write the script, and I am sharing it with the world. You will need to use the other analytics extension, which it relies on. Here is the solution. davec 19:05, 16 April 2007 (UTC)Reply


Im getting the following error "Warning: Cannot modify header information - headers already sent by (output started at /homepages/30/d220873475/htdocs/wiki/extensions/an alytics.php:35) in /homepages/30/d220873475/htdocs/wiki/includes/WebR esponse.php on line 10" I posted more about it here

New version of Google analytics[edit]

It seems that there is a new version of Google analytics. See there : http://www.google.com/support/analytics/bin/answer.py?answer=75129. Do you plan an update of your extension for non IT guys ? Thanks, 1001nuits 16:09, 14 February 2008 (UTC)Reply

Yes, I'd love it to be updated to. This makes it nice not having to mess with the code. --74.77.80.214 02:42, 16 May 2008 (UTC)Reply

How do I use this to limit GA results to a single category?[edit]

Rather than create a namespace so that there's a common URL pattern across all designated articles, I want to track Google Analytics for a specific MediaWiki category — can I do it with this extension or another? Thanks in advance. --Torley 21:25, 22 September 2009 (UTC)Reply

Better way of implementation[edit]

Hi guys, i just downloaded your extension and read the code. You simply exclude the GA Code from getting executed if the user is a bot or a sysop. I think there is a better way of implementing this feature. Read about custom variables in Google Analytics here! If you use a custom variable "usertype", you don't loose any information... Cheers, MG 217.189.237.216 17:41, 1 June 2010 (UTC)Reply

searching for the word "usertype" gives me zero results.

How to use the google analytics extension in a MediaWiki web site?[edit]

The extension talk showed that in order to use the Google Analytics extension in a MediaWiki website is through that code:

<analytics uacct="UA-17301139-1" ></analytics>

For more accurrancy, would you tell us in which file should we add this

<analytics uacct="UA-17301139-1" ></analytics>

source code? A hole file will be better.

Thanks.

Exclusion of talk pages[edit]

In my Google Analytics all talk pages appear as Error 404 Non found, as there is nothing in them. I have already removed the talk tab from the wiki, but GA still sees them. I tried a robot.txt, but that did not work. All these missing talk pages (over 20000) affect my google rating... How can I avoid GA to see the talk pages or how an I automatically create every talk page with some text ? Knorrepoes 18:24, 11 August 2011 (UTC)Reply