Jump to content
  • 0

GTag not inserting tracking code


Orchinib

Question

Hi,

 

I installed the GTag extension and have verified that it is installed and running via the SpecialPages:Version page.  I also added my tracking code to the $wgGTagAnalyticsId variable in LocalSettings.php.  However, I when I view the source of a page in my wiki, it does not have the tracking code in the source (I did a search for 'gtag' as well as my tracking code).

 

Please advise.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

By default the extension will omit the tracking code if your browser sends a "Do Not Track" signal to the website. I am guessing this is what is happening for you, as some more privacy-focused browsers send this signal by default, and most other browsers can be configured to send that signal in their privacy settings.

The extension page on mediawiki.org goes into more detail on how to configure this behavior, as well as a means of exempting user groups from being tracked.

Link to comment
Share on other sites

  • 0
2 hours ago, Skizzerz said:

By default the extension will omit the tracking code if your browser sends a "Do Not Track" signal to the website. I am guessing this is what is happening for you, as some more privacy-focused browsers send this signal by default, and most other browsers can be configured to send that signal in their privacy settings.

The extension page on mediawiki.org goes into more detail on how to configure this behavior, as well as a means of exempting user groups from being tracked.

Ah.  I set the $wgGTagHonorDNT flag to false and am seeing the tracking code now.  Thank you for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.