Title. We can't see any JS tracking code when opening developer tools, but we do see hits when looking at Google Analytics.
Extension talk:GTag
Appearance
$wgGTagHonorDNT defaults to true, and a lot of browsers either default to or can be easily configured to sending the DNT: 1 header. If that config is true and the DNT header is present, no tracking js is generated. Additionally, if you're in a group with the gtag-exempt right, no tracking js is generated.
https://cdn.discordapp.com/attachments/900392398520221736/1114156185969500180/GTag.zip
So that you won't need to download from the crappy mwusers.org site.
I wouldn't recommend trusting random download links such as this one, please use one of the official download mechanisms (mwusers or GitHub).
That option (i.e, GitHub) was explicitly mentioned only a few days back.
Will this extension be updated at some point? The current version is already 2 years old. Google is now transitioning all to GA4, wondering if that's compatible
GA4 is already supported with the current (2 years old) version of the extension. Simply supply your "G-" ID to the extension configuration.
Hello! I think this extension should show a message to accept or decline the cookies because GA doesn't respect the GDPR in European countries without the agreement of the user.
Use Extension:CookieWarning for that.
Would it bepossible to add Google Tag Manager configuration with this as well? As Google moves to "tag-based" analytics, I could see there being some value with adding these via an extension.
The Tag Manager requires two snippets where GTM-XXXXXX is a unique identifier. The first one, "as high in within the <head> as possible:"
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
And this one just after the opening <body> tag:
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
@Blinkingline Were you able to find a solution to this (add a Google Tag Manager) in your MediaWiki site? I am facing the same problem.
Do I have to have the exact UA-xxxxxxxx-x format when filling in the ID in LocalSettings? or is just the xxxxxxxxx part is fine?
The entire thing, including the UA- prefix (if that's the type of tracking id you have; Google has a handful of different prefixes).
Sorry if this is a dumb question. I'm trying to figure out the best way to add Google Analytics to my wiki.
What's the difference between GTag and Google Analytics Integration extensions?
I downloaded the other one because it seemed to be maintained by Wikimedia Foundation, but now I'm not sure if I downloaded the right extension.
Thanks!
Neither extension is maintained by the Wikimedia Foundation. This one uses the newer global site tag (gtag.js) API, the other extension uses an older (legacy) google analytics API. They may have a handful of functionality differences as well in terms of configuration and features.
How could i anonymize IP-addresses?
This is not currently supported but I’ll look into adding it.
Since DSGVO it is a MUST in germany.
Version 1.1.0 has been released which adds a new configuration option for this.
Many thanks works perfectly.
One more: We also uses the Google-TAG-Manager wich came with its own code for the <header> and with code for <body>
It looks like:
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:;j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PTCRZHX');</script>
and
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PTCRZHX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
Is there a delay till Google Analytics start delivering data for the first time for a website? I have set up Google Analytics more than 24h ago, I see the tag in the wiki's source code, but Realtime monitoring shows 0 traffic.
Any ideas?
There are no older topics