Post-Purchase Google Ads Conversion Tracking and Re-marketing tag NOT being tracked

Topic summary

A developer is struggling to implement Google Ads conversion tracking and remarketing tags on Shopify’s post-purchase page, despite successfully implementing them on the order status page.

Key Technical Details:

  • The conversion tracking works correctly on the order status page but fails on the post-purchase page
  • The developer suspects iframe restrictions may be preventing the tracking from functioning
  • Both implementations use similar Google gtag.js scripts with conversion events
  • Google Tag Assistant shows the script loading but no conversion records appear

Proposed Solution:
A respondent suggests the issue stems from Google Ads rejecting duplicate conversions with the same transaction_id. Since both the order status page and post-purchase page fire conversion events for the same order, Google may be filtering out the second event as a duplicate.

Current Status:
The discussion remains technical and focused on identifying whether the root cause is iframe limitations, duplicate transaction ID handling, or post-purchase page script functionality constraints. The issue is unresolved, with the developer seeking additional insights on how to properly track conversions on the post-purchase page.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

I’ve run out of ideas and could use any insights. I’m trying to figure out how to make Google Ads Conversion Tracking and Remarketing tags be tracked on the post-purchase page.

  1. I am familiar with and well versed in the Post-Purchase tracking and Shopify provided documentation and examples: https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/pixel-tracking-post-purchase-page#example-script

  2. It looks like there is something that prevents this conversion event from being tracked in an iframe. It works fine on the order status page but not on the post-purchase page. I believe it may be possible the functionality of the post-purchase script doesn’t support this type of event.

  3. Scripts for comparison

Order status page script:

{% if first_time_accessed %}
<!-- Global site tag (gtag.js) - Google Ads: 12345678test-->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-12345678test"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-12345678test');
</script>

<!-- Event snippet for Sales conversion page -->
<script>
  gtag('event', 'conversion', {
      'send_to': 'AW-12345678test/xR07CNvSy6gBELid49UC',
      'value': {{ checkout.total_price | money_without_currency }},
      'currency': '{{ shop.currency }}',
      'transaction_id': '{{ order_number }}'
  });
</script>
{% endif %}

Post Purchase script:

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-12345678test"></script>
<script>
!function () {
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }

    const order = window.Shopify.order;
    const conversionId = 'AW-12345678test';
    const conversionLabel = 'xR07CNvSy6gBELid49UC';
    const options = {
        send_to: conversionId + '/' + conversionLabel,
        value: order.totalPrice,
        currency: order.currency,
        transaction_id: order.id
    };

    gtag('js', new Date());
    gtag('config', conversionId);

    if (!Shopify.wasPostPurchasePageSeen) {
        gtag('event', 'conversion', options);
    }

    Shopify.on('CheckoutAmended', function (newOrder, previousOrder) {
        const oldItems = previousOrder.lineItems.map(function (line) {
            return line.id;
        });
        const newItem = newOrder.lineItems.find(function (line) {
            return oldItems.indexOf(line.id) < 0;
        });
        if (!newItem) return;
        options.value = newOrder.totalPrice;
        gtag('event', 'conversion', options);
    });
}();
</script>
  1. When used there is a record of the google tag script being loaded, but no records with a tracked conversion. Image: https://www.screencast.com/t/QCN5xcpEKa

I believe Google does not accept duplicate conversions for the same transaction_id. I see two calls, one in order_status and the other in the post_purchase for the same order Id.

Reference: https://support.google.com/google-ads/answer/6386790

1 Like