magepal / magento2-google-tag-manager

Google Tag Manager is a user-friendly, yet powerful and cost-effective solution that is a must-have integration for every Magento store. It simplifies the process of adding and managing third-party JavaScript tags. With dozens of custom events and hundreds of data points our extensions the #1 GTM solution for Magento.

Home Page:https://www.magepal.com/google-tag-manager.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't seem to track order value on Adwords tracking

InternetMedicineMan opened this issue · comments

So in GTM we are referencing the variables provided by the module but we seem to get different information for some reason and it started suddenly with no changes. It was working fine before Sept 5, but after changing nothing it seems broken after.

Magento version #: 2.2.5

Edition (EE, CE, OS, etc): CE

Expected behavior: Track revenue in Adwords

Actual behavior: Getting incorrect values.

Steps to reproduce:

In GTM we used to have the following:

<!-- Event snippet for Rev Orders conversion page -->
<script>
  gtag('event', 'conversion', {
      'send_to': 'redacted',
      'value': {{transactionSubTotal}},
      'currency': 'USD',
      'transaction_id': '{{transactionId}}'
  });
</script>

But the {{transactionSubTotal}} would come back with our GTM tag account number. So then I changed it to the following:

<!-- Event snippet for Rev Orders conversion page -->
<script>
  gtag('event', 'conversion', {
      'send_to': 'redacted',
      'value': '{{transactionSubTotal}}',
      'currency': 'USD',
      'transaction_id': '{{transactionId}}'
  });
</script>

Notice all I did here was surround it in single quotes. Now the value is correct. However, because it's in single quotes Adwords still doesn't track the value. We are getting nothing on the Adwords side but we are tracking the events, just no value is assigned.

@InternetMedicineMan ... So before Sept 5th, it was working... did you make any upgrade to our extension?

Any reason you are not doing something like http://www.clixmarketing.com/blog/2017/09/05/how-to-configure-adwords-tracking-in-google-tag-manager/

Right, we just happened to notice it was no longer tracking conversions and Sept 5 was when it stopped, I guess technically it stopped sometime around Sept 4 if Sept 5 is completely dead. And no nothing changed, we use version tracking and nothing was rolled out or deployed.

We have tried doing it both ways. The way I describe above is me outlining the code, and the way you described is identical it's just the system generating for you. The output to the site is the same either way. And when we use the {{transactionSubTotal}} it's the Google ID for the account when it's not in single quotes, and if it's in quotes it works properly but Adwords doesn't recognize it because it doesn't want quotes around it.

I can generate some screenshots off my staging server in a little bit.

If you open a paid ticket I will look into but 99.99% this is not an issue within our module.

Did you take a look at our new Enhanced Ecommerce? Running an e-commerce site without in-depth knowledge of how your customers are interacting with your products does not make sense. https://www.magepal.com/magento2/extensions/enhanced-ecommerce-for-google-tag-manager.html

I was hoping it was something known, didn't figure it was something specific to your module but something conflicting or changed in GTM or something.

The first set of code I supplied above (without single quotes) results in the following on page:
http://take.ms/RoEbB

And the second set of code (with single quotes) results in the following which Adwords doesn't recognize:
http://take.ms/ufB61

I'll take a look and see if they are interested in the extra module. It might be a tough sell when this one suddenly doesn't seem to report the right values into the GTM and we don't know why. Naturally I'm sure support goes with it. We do already have quite a bit of tracking, so will have to look at what additional levels this would provide.