Why need modify Shopify Additional Script?

Since Intercart utilizes shopify's order status page as Thank you page, Shopify's Checkout additional script (if any) will be fired. To avoid duplicate purchase tracking, existing script should be updated to filter Intercart checkouts.

Why not just remove Shopify Additional Script for Tracking?

Intercart & Shopify checkout will work in parallel for difference scenarios, more details please refer to: General FAQ Q6

Why not fire purchase events in Thank you page?

Intercart implements post-purchase upsells, when customers reach post-purchase upsell page, since the purchase is completed, they can simply drop off by closing the browser, thus they do not reach thank you page to trigger tracking script.

By implement Intercart Extension, purchase events will be fired before reaching post-purchase upsell pages and no purchase events will be missed.

Do I need to modify Additional Script for TrackifyX Integration?

No need, all FB events are handled by TrackifyX.


Action to do

Apply the below filter functions to your existing Shopify Additional Script for purchase tracking, it has two filters:

  1. Execute tracking script for the first time visit only
  2. Execute tracking script for non-Intercart checkouts only
{% if first_time_accessed %}

<script>
  let isIntercartCheckout = false;
  {% for tag in order.tags %}
  if ('{{ tag }}' === 'PoweredByIntercart') {
    console.log('Intercart checkout detected, skip tracking script.');
    isIntercartCheckout = true;
  }
  {% endfor %}
  if (!isIntercartCheckout) {
    console.log('Non-intercart checkout detected, process tracking script.');
    /* TRACKING PLATFORM's CODE HERE - begin */




    /* TRACKING PLATFORM's CODE HERE - end */
  }
</script>

{% endif %}

Reference:
https://help.shopify.com/en/manual/orders/status-tracking/add-conversion-tracking-to-thank-you-page
https://help.shopify.com/en/manual/orders/status-tracking/first-time-accessed



---

Did this answer your question?