Can anyone show me how exactly to set GTM + Adwords in Shopify?

Highlighted
New Member
1 0 0

Hi, I tried for weeks to setup GTM + Adwords but fail to do.

Here is my setting.I use 'XXXXX' to cover the real number

 

In [Preference] I inserted GA code with additional GA javascript:

 

(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');
gtag('config', 'AW-XXXXXXXXX');

 

 

In [Setting] ->[Checkout] I insert Addtional scripts:

 

<script> window.dataLayer = window.dataLayer || []; dataLayer.push({ 'event' : 'transactionComplete', 'ecommerce': { 'purchase': { 'actionField': { 'id': '{{order.order_number}}',  'revenue': '{{total_price | times: 0.01}}', 'tax':'{{tax_price | times: 0.01}}', 'shipping': '{{shipping_price | times: 0.01}}', }, 'products': [ {% for line_item in line_items %} { 'name': '{{line_item.title}}', 'id': '{{line_item.id}}', 'price': '{{line_item.line_price | times: 0.01}}', 'brand': '{{line_item.vendor}}', 'category': '{{line_item.type}}', 'variant': '{{line_item.variant.title}}', 'quantity': {{line_item.quantity}} }, {% endfor %} ] } } }); </script> <!-- Google Tag Manager --> <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'?'&amp;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> <noscript><iframe src=&quot;https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;display:none;visibility:hidden&quot;></iframe></noscript> <!-- End Google Tag Manager -->

 

 

 

In GTM, I set trigger

Trigger fire on page URL contains "thank_you"

Adwords Conversation Tracking

Conversion ID: XXXXXXXX

Conversion Lable: JsnXXXXXXXXXXXXXX

Conversion Value: {{transRevenue}} (Variable name : ecommerce.purchase.actionField.id)

Order ID: {{transOrderID}} (Variable name: ecommerce.purchase.actionField.id)

Currency Code: SGD

 

 

The Data Layer fired. But Adwords cannot record anything.

Can anyone help me?

Thanks

 

0 Likes