Why isn't my Google Ads Conversion Tag firing on Shopify?

BillRTS
Visitor
1 0 1

We're setting up a new store on the Shopify tier of service.  The Post Purchase snippet input is not available at this level (only order status) and we can't get the conversion tag to fire from this location.  The GA tags (to theme header) and. they work fine and the code update removed the ability to add tags to the theme's checkout page directly.  Any insights?

{% if first_time_accessed %}
// run this only once at checkout

<!-- Event snippet for Website sale conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': 'AW-xxxxxxxxxxxxxxxxxxxxxxxx',
'value': 65.00,
'currency': 'USD',
'transaction_id': '<%= orderId %>'
});
</script>

{% endif %}

Reply 1 (1)

flareAI
Shopify Partner
2405 223 537

Hello @BillRTS,


Greetings! I am Gina from the flareAI app helping Shopify merchants get $6Million+ in sales from Google Search, on autopilot.


Looks like you are trying to add a conversion tag to the post-purchase thank you page in Shopify but are unable to do so at your current service tier.


At the Shopify tier of service, you may not have the ability to directly modify the post-purchase thank you page, which could be why the Post Purchase snippet input is not available to you. Instead, you may only be able to modify the order status page.


To fire the conversion tag from the order status page, you can modify your code to trigger the conversion tag based on the order status instead of the post-purchase page. You can modify the code you provided to look like the following.


{% if order_status %}
<!-- Event snippet for Website sale conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': 'AW-xxxxxxxxxxxxxxxxxxxxxxxx',
'value': 65.00,
'currency': 'USD',
'transaction_id': '{{ order_number }}'
});
</script>
{% endif %}


This code will fire the conversion tag when the order status is displayed to the customer. Note that the {{ order_number }} variable is used to capture the transaction ID and should work in place of <%= orderId %>.


Keep in mind that the order status page may be displayed to the customer multiple times (e.g. if they refresh the page), which could result in duplicate conversions being recorded. To avoid this, you may want to modify the code to track conversions only once per order.


Let me know if you have any further questions.


Gina

flareAI : Get Sales from Google Search, on Autopilot
$10+ billion in eCommerce on Google Search, every day. Find out how much you are missing