How to Change Product IDs from SKU to Shopify IDs to Match Merchant Center Products DL 1.0


Data Layer 1.0. has been depreciated

Please follow our upgrade guide to update to our latest version.

This article shows how to update the default product IDs contained in the GTM tags so your tag hits from your website match the IDs for your products in Merchant Center.

When installing the data layer we make three variables related to product IDs available for your use:

  1. Variant SKU
  2. Shopify Product ID
  3. Variant IDs (e.g. shopify_US_12345_14322)

By default, all of our tags in our pre-built container are set to SKU as the Item IDs. So if your merchant center IDs are using SKUs then you don't need to do anything further :)!

But if you need to change the tags from sending SKU to Shopify product IDs then you will need to update a few things in GTM.

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

How to Find Your Merchant Center Product ID

Inside of Google Merchant Center navigate to products and look for your item id's here:

And this is an example tag that you will need to match the same Item ID up to in GTM:

Once you have your ID format then move to the next step.

The following options below show how to change to product ID OR to shopify_US_111111_111111 (or similar variations based on geo-location).

How to Change Item ID (aka ecomm_prodid) from SKU to Product ID in GTM

If your Google Merchant Account is using Shopify product IDs instead of variant SKUs then you will need to update 5 variables in Google Tag Manager.

What needs to be updated:

  1. custom js - Adwords Product View SKU
  2. custom js - AdWords Collection Page SKU
  3. custom js - Adwords Add to Cart SKU
  4. custom js - Adwords Cart Page SKU
  5. custom js - AdWords Transaction SKU



to this:

'id': product.productId

View Item:

Go to Tags > AdWords Remarketing - View Item and update out the following areas circled in red to match the product ID variables

View Item List:

Here is what your View Item List tag should look like:

Add to Cart:

Here is what your Add to Cart tag should look like:

Cart Page:

Here is what your Cart Tag should look like:


And finally here is what your purchase tag should look like:


If you'd like to adjust from variant SKU to variant id, or shopifyUS type of id then use the examples below to update the row for IDs. Note the only part that is changed is "id" in in the above screenshots.

Variant IDs

'id': product.variantId

ShopifyUS IDs

'id': product.shopifyId

Additional Resources

Need to change shopify_US to another geo-location? Here is how you do it.


Worried You’re Making Decisions on Data You Can’t Trust?

Check out our blog and discover Shopify Optimization & Analytics Tips from Elevar's data experts.