AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
5.1K members online now
5.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Should I use our variant SKUs or product ID

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi - 

 

I'm in the process of setting up Enhanced Ecommerce and I'm in a quandary about how best to approach it.

 

Our products are books and they have variants which are the available formats - paperback, ebook, etc. The product has a name and an ID (from the database), and the variants each have names and their own SKUs. The variants are really different products, rather than simply the same product but a different size or colour which is how most of the examples I've found are modelled.

 

If we take the purchase event as an example...

 

Option 1: use the product name but the variant SKU

 

'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'ORDERNUMBER',
        'revenue': '6.99',
        'tax':'0.00',
        'shipping': '1.00',
      },
      'products': [
              {
                  'name': 'Wuthering Heights', // Product name
                  'id': '03-1234-56', // Variant SKU
                  'price': '6.99', // Variant price
                  'quantity': '1',
              }
      ]
    }
  }

 

 Option 2: use the variant name and SKU

 

'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'ORDERNUMBER',
        'revenue': '6.99',
        'tax':'0.00',
        'shipping': '1.00',
      },
      'products': [
              {
                  'name': 'Wuthering Heights (Paperback)', // Variant name
                  'id': '03-1234-56', // Variant SKU
                  'price': '6.99', // Variant price
                  'quantity': '1',
              }
      ]
    }
  }

Option 3: Use the product name, the variant SKU and use the 'variant' parameter

 

'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'ORDERNUMBER',
        'revenue': '6.99',
        'tax':'0.00',
        'shipping': '1.00',
      },
      'products': [
              {
                  'name': 'Wuthering Heights', // Product name
                  'id': '03-1234-56', // Variant SKU
                  'price': '6.99', // Variant price
                  'quantity': '1',
                  'variant': 'Paperback', // Variant name
              }
      ]
    }
  }

Option 4: drop using variant SKUs and just use the product's database ID instead

'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'ORDERNUMBER',
        'revenue': '6.99',
        'tax':'0.00',
        'shipping': '1.00',
      },
      'products': [
              {
                  'name': 'Wuthering Heights', // Product name
                  'id': '1012', // Product ID
                  'price': '6.99', // Variant price
                  'quantity': '1',
                  'variant': 'Paperback', // Variant name
              }
      ]
    }
  }

 

Or something else?

 

As well as this, the purchase, checkout and add-to-cart events seem to fit nicely using the variant-level data, but when I start thinking about the detail and list events they seem to need product-level data.

 

A search result could list 20 books. Each book has at least 2 variants so should I be passing the data for 40 variants to the dataLayer? The product/book itself doesn't have an SKU. It does have an ID (from the database) but if I used that for impressions it wouldn't match up for the add-to-cart, checkout and purchase events.

 

I'm possibly overcomplicating this so any advice would be much appreciated.

 

Cheers

1 Expert replyverified_user

Should I use our variant SKUs or product ID

Rising Star
# 2
Rising Star

Hi Jamie,

 

Yes you may be overthinking it.  Smiley Happy  Actually you are doing you due diligence.  Have you considered starting at your reporting, what's in your measurement plan, and KPI's and working backwards (You may need Marketing to flesh that out)?

 

If your most important KPI is a one to one on product list impressions to clicks to adds to checkout then go with one like your database id but still pass the SKU in somewehere either as a variant or as a hit level custom dimension. 

 

You can also use the Measurement Protocol and the hit builder and some test properties to mimic each method and see exactly how the data appears; that or just a good robust test using each method.

 

I hope that helps some!

 

Resources:

 

https://developers.google.com/analytics/devguides/collection/protocol/v1/

 

https://ga-dev-tools.appspot.com/hit-builder/

 

Best,

 

Theo Bennet

 

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn