How to Change Product IDs from SKU to Shopify Variant IDs

This guide shows how to change the ecomm_prodid from sku's to Shopify variants

When installing the app we make two dataLayer variables available for your use:

  1. SKU
  2. Shopify variant IDs (e.g. shopify_us_12345_14322)

To change the ecomm_prodid from sku's to Shopify's variant, you will need to change two tags in GTM.

How to change ecomm_prodid from sku to variant

If your Shopify store is using Shopify product IDs instead of variant SKUs in your Google Merchant Center then you will need to change out two variables in Google Tag Manager.

Why? Google Merchant Center product IDs need to match the ecomm_prodid that we are sending with the remarketing tags. When these don't match you'll usually see errors within your AdWords audience sources.

What needs to be updated:

  1. Adwords - gtag - Product Pages
  2. Adwords - gtag - Cart Page

Step 1: Within the product page gtag, go to this:

And then change the variable to be:

dlv - Product View - Shopify_US SKU


Here is how to change it. You can start by typing {{ which will show the dropdown:

Step 2: Make this same change for the cart page tag as well, and you're all set!