Skip to main content
All CollectionsSales TrackingJavascript Tracking
How to Implement Javascript Tracking using GTM and Shopify Checkout Extensibility
How to Implement Javascript Tracking using GTM and Shopify Checkout Extensibility

Set up conversion tracking by integrating Shopify Checkout Extensibility and Google Tag Manager

Heather Clark avatar
Written by Heather Clark
Updated over a month ago

Shopify has announced the deprecation of the Additional Scripts section for integrations, effective August 28, 2025. Instead of using Additional Scripts, it is recommended that you switch to using Shopify's Custom Pixels. It's important to note that all Shopify stores with Custom Pixels have access to Google Tag Manager.

This article will guide you through setting up JavaScript tracking in Google Tag Manager for Shopify's Checkout Extensibility.

Part 1: Set up a Custom Pixel for Google Tag Manager

  1. In your Google Tag Manager account, click on your Google container ID near the top right of the page to open the installation code snippet.

  2. Copy the code block that belongs in the <head> section of the page.

  3. Navigate to your Shopify admin and select Settings > Customer events > Add custom pixel.

  4. Paste the Google Tag Manager code snippet you copied in Step 2 into the code editor. Important: Remove all HTML tags from the code block. For example, <script></script>.

  5. Next, you will need to add code to subscribe to customer events and push them to GTM’s dataLayer. By default, Shopify offers a set of standard events that can be found here.

    Below is an example of subscribing to the standard “checkout _completed” event, which will push information to GTM whenever a visitor completes a purchase at your store.

    analytics.subscribe("checkout_completed", (event) => { 
    window.dataLayer.push({
    event: "checkout_completed",
    order_id: event.data.checkout.order.id,
    price: event.data.checkout.subtotalPrice.amount
    });
    });

Part 2: Configure Google Tag Manager to accept events

After creating your custom pixel, you'll need to configure Google Tag Manager to receive events from it and then forward them to Aspire via TUNE. To accomplish this, you will need to set up a tag, a trigger, and dataLayer variables in Google Tag Manager.

  1. Go back to Google Tag Manager and click Triggers, then click New to create a new trigger.

    Set up the Google Tag Manager trigger as a Custom Event with the same event name as your Custom Pixel. In our example, this would be "checkout_completed". Set the trigger to fire on All Custom Events. Click Save.

  2. From your GTM workspace, click Variables, then click New next to User-Defined Variables.


    Create GTM variables to capture the data fields from the event. In our example, these are order_id and price. The fields are mapped to a dataLayer variable in Google Tag Manager.

3. Configure Google Tag Manager to send events to TUNE

Lastly, you need to add a TUNE click tag and a TUNE conversion tag that uses the trigger you just created. Please refer to this step-by-step guide to set up your two TUNE tags.

Under Conversion Parameters, you will add the dataLayer variables for order_id and price.

  • Parameter 1: amount → Use the dataLayer variable for price.

  • Parameter 2: adv_unique1 → Use the dataLayer variable for order_id.

Each time the conversion tag fires, it will capture these dataLayer variables and send the event information to Aspire via TUNE.

If you have any questions about this setup process, please reach out to our Support Team at [email protected].

Did this answer your question?