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

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 app we make three dataLayer variables related to product IDs available for your use:

  1. Variant SKU
  2. Shopify Product ID
  3. Shopify product and 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.

Option 1: How to Change Item ID (aka ecomm_prodid) from SKU to Product ID in GTM
Option 2: How to Change Item ID (aka ecomm_prodid) from SKU to Shopify_US ID in GTM

How to Find Your Merchant Center Product ID

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

merchant-center-item-ids-1

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

view-product-id-tag

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). 

Option 1: 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 tags in Google Tag Manager.

What needs to be updated:

  1. Adwords Remarketing - View Item
  2. AdWords Remarketing - View Item List
  3. Adwords Remarketing - Add to Cart
  4. AdWords Remarketing - Cart Page
  5. AdWords Remarketing - Purchase

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 product id

 

View Item List:

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

collectionprodids

Add to Cart:

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

addtocartids

 

Cart Page:

Here is what your Cart Tag should look like:

cartprodids

Purchase: 

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

checkoutprodids

Option 2: How to Change Item ID (aka ecomm_prodid) from SKU to Shopify_US ID in GTM

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 5 variables in Google Tag Manager.

What needs to be updated:

  1. Adwords Remarketing - View Item
  2. AdWords Remarketing - View Item List
  3. Adwords Remarketing - Add to Cart
  4. AdWords Remarketing - Cart Page
  5. AdWords Remarketing - Purchase

You can find the 5 variables for these item ID hits inside of GTM > Variables > User Defined Variables:

shopify_US_variables

And then for each AdWords Remarketing tag, you will need to update the Item ID to match the respective variable for the tag. 

For example here is the View Item Tag:

shopifyviewids

Notice how the event items were swapped out for the AdWords View Shopify_US IDs variable. 

Now just repeat this for the remaining 4 remarketing tags and you will be all set!

Additional Resources

Need to change shopify_US to another geo-location? I show how to do so here.

 

Back to Top 🔝