During a conversation with someone at Google Adwords they said my site is reporting an "error" as regards Analytics, although they couldn't give any more information than that apparently. If I compare the page source on my site with the code snippet stated in my actual Analytics account, they are different. In Administration/Property/Tracking code this is what GA says I should paste into my pages:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxx-x');
</script>
The following however seems to be what's coming through from looking at the html on a random page of my site:
<script>(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","http://www.mysite.com/sites/default/files/googleanalytics/analytics.js?p2e2ta","ga");ga("create", "UA-xxxxxxx-x", {"cookieDomain":"auto"});ga("set", "anonymizeIp", true);ga("send", "pageview");</script>
Is this a problem or in any way related to what Adwords might be complaining about? I confirm that the property element is correct.
Comments
Comment #2
hass CreditAttribution: hass commented7.x-2.x is ga.js API and not gtag. The older api has MORE features and gtag is BETA. I was also told that the GA site should not show the gtag by default... it is a bug per Google developer.
A version with gtag API is not fully untested, but exists in 8.x-3.x.
Comment #4
vincentdemers CreditAttribution: vincentdemers commentedI am also affected by this issue.
Google requires gtag.js to track conversions properly work with Adwords.
I'm using D7. Is the only way to implement gtag.js is manually in html.tpl.php?
Comment #5
hass CreditAttribution: hass commentedBullsh**.
Comment #6
vincentdemers CreditAttribution: vincentdemers commentedHi Hass. Thx for your response. Sorry man I sincerely do not mean to piss you off with this.
I swear Google is currently telling it's Adwords customers that gtag.js is required to track conversions properly in Adwords... However I have goals set in Analytics and I can use them to track conversions from CPC ads.. so it's not a big deal because it works in Analytics.
It just does not work in Adwords...
Me and my customer spoke to the guys at Google Adwords on the phone and we used their "Tag Assistant" chrome extension to track errors.
They are claiming me that changing the js code to the gtag.js version would fix the tracking issue in Adwords.
Comment #7
xaris.tsimpouris CreditAttribution: xaris.tsimpouris commentedI agree with vincentdemers. This is the following I also received. Hope we had an gtag version of the module for D7.
Comment #8
joel_osc CreditAttribution: joel_osc at OpenPlus commentedWe also have a client that has run into this...
Comment #9
AdamGerthel CreditAttribution: AdamGerthel as a volunteer commentedI just ran into the same problem. Took me a while to figure out was gtag.js was, since I mistook it for a Google Tag Manager first. Apparently gtag.js is replacing the current Universal Analytics tag and there doesn't seem to be any way around it. The Adwords tag installation manuals refer solely to the new gtag.js and are warning that from Sept 19th 2018, Adwords tracking will be unreliable for Safari users if the old tag is used.
Comment #10
Greg Varga CreditAttribution: Greg Varga commentedSame issue here. Clients have been asked to change the GA tracking code to the new "gtag.js".
This is the code which shows up in Google Analytics by default.
We had to disable the google_analytics module and add this to the header otherwise the Google Ads rep. didn't leave us alone.