Difference between revisions of "Widget:GoogleAnalytics"
From www.coria-cfd.fr
m (Protected "Widget:GoogleAnalytics" ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
|||
Line 10: | Line 10: | ||
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article. | To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article. | ||
</noinclude><includeonly><script type="text/javascript"> | </noinclude><includeonly><script type="text/javascript"> | ||
− | var | + | var _gaq = _gaq || []; |
− | + | _gaq.push(['_setAccount', '<!--{$tracker|escape:'html'}-->']); | |
− | + | _gaq.push(['_trackPageview']); | |
− | + | (function() { | |
− | + | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
− | var | + | 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></includeonly> |
Latest revision as of 15:27, 18 February 2011
This widget allows you to add Google Analytics to your wiki page.
It was created by V. Moureau.
Using this widget
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:GoogleAnalytics article.