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

--------

NOTE: UPDATED MAY 13: With the recent update from AdWords on their required parameters we know have two versions of this "How to". We have the new and old version below with instructions.

--------

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

  1. Variant SKU
  2. Shopify product IDs (e.g. shopify_US_12345_14322)

To change the ecomm_prodid from SKU to Shopify product ID, you will need to update a few things in GTM.

-----New GTM Suite Version from May 13, 2019-----

Please be sure you are using the latest container download found here.

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 Remarketing - View Item
  2. Adwords Remarketing - Add to Cart
  3. AdWords Remarketing - Cart Page

We will have se

Step 1:

Go to Variables > User Defined Variables > and search for "custom js - " and you should see this list:

Screen Shot 2019-05-13 at 4.49.15 PM

For each of the view ids and add to cart ids please modify the .id variable to instead be the Shopify US variable as shown here:

changing-to-shopify-US


Step 2:

Repeat this step for the Cart page as well:

Screen Shot 2019-05-13 at 4.52.39 PM

Save and publish.

-----Old GTM Suite Version-----

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!