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

awebmanager created an issue. See original summary.

hass’s picture

Status: Active » Fixed

7.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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

vincentdemers’s picture

I 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?

hass’s picture

Google requires gtag.js to track conversions properly work with Adwords.

Bullsh**.

vincentdemers’s picture

Hi 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.

xaris.tsimpouris’s picture

I agree with vincentdemers. This is the following I also received. Hope we had an gtag version of the module for D7.

Dear Google Ads Advertiser,
You're receiving this message because of recent changes that impact your Google Ads account (Customer ID: ***-***-****)
To keep up with changes in browser technology and how cookies are handled, please replace the legacy conversion tags on your website as soon as possible with the global site tag (gtag.js), which is the best way to measure conversions.

joel_osc’s picture

We also have a client that has run into this...

AdamGerthel’s picture

I 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.

Greg Varga’s picture

Same 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.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=[UA-xxxxxxxxxx]"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '[UA-xxxxxxxxxx]');
</script>

We had to disable the google_analytics module and add this to the header otherwise the Google Ads rep. didn't leave us alone.