SEO, AdWords, affiliates, advertising, and promotions
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'?'&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="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" height="0" width="0" style="display:none;visibility:hidden"></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
Your efforts to set up Google Tag Manager (GTM) and AdWords conversion tracking on your website appear to have been successful. The setup might be failing due to a few problems, though, based on the information you've provided. If it's okay with you, might I look into it for you?
User | RANK |
---|---|
9 | |
8 | |
3 | |
3 | |
3 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023