Product identification

You are reading about requirements for the integration done by the Luigi's Box team. You can safely skip this part of the documentation if you are integrating yourself using either API or Luigi's Box frontend libraries.

For effective learning of the AI models, we need to agree on the data identities that we will use for pairing. These identities will have to be present in the catalog data that you are pushing to Luigi's Box (via API or feeds). They also have to be present on the website where the analytics module can pick them up and use them for reporting.

You are using Google analytics enhanced ecommerce

If you use enhanced ecommerce in Google analytics and report ecommerce events via dataLayer, Luigi's Box analytics will pick them up automatically. The identities that you use for GA should also be used for Luigi's Box.

Below is an example "purchase" event that you can find the official GA documentation. Look inside the products and id field.

Please note that we are not asking you to implement enhanced ecommerce tracking for GA. If you don't already have a similar code on your site that's ok and you are ok to choose arbitrary product identity. If you already have enhanced ecommerce implemented, to use it effectively in tandem with Luigi's Box, we should align on using the same product identity.

Luigi's Box reads the events for "product detail view" - the detail event. See an example event from the GA documentation

<script>
// Measure a view of product details. This example assumes the detail view occurs on pageload,
// and also tracks a standard pageview of the details page.
dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
dataLayer.push({
  'ecommerce': {
    'detail': {
      'actionField': {'list': 'Apparel Gallery'},
      'products': [{
        'name': 'Triblend Android T-Shirt',
        'id': '12345',           // This should be the product identity for Luigi's Box
        'price': '15.25',
        'brand': 'Google',
        'category': 'Apparel',
        'variant': 'Gray'
       }]
     }
   }
});
</script>

Luigi's Box reads the events for purchase - the purchase event. See an example event from the GA documentation

<script>
// Send transaction data with a pageview if available
// when the page loads. Otherwise, use an event when the transaction
// data becomes available.
dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
dataLayer.push({
  'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'T12345',
        'affiliation': 'Online Store',
        'revenue': '35.43',
        'tax':'4.90',
        'shipping': '5.99',
        'coupon': 'SUMMER_SALE'
      },
      'products': [{
        'name': 'Triblend Android T-Shirt',
        'id': '12345',            // This should be the product identity for Luigi's Box
        'price': '15.25',
        'brand': 'Google',
        'category': 'Apparel',
        'variant': 'Gray',
        'quantity': 1,
        'coupon': ''
       },
       {
        'name': 'Donut Friday Scented T-Shirt',
        'id': '67890',           // This should be the product identity for Luigi's Box
        'price': '33.75',
        'brand': 'Google',
        'category': 'Apparel',
        'variant': 'Black',
        'quantity': 1
       }]
    }
  }
});
</script>
If you are using GA4 and emit enhanced ecommerce events, you don't have to do anything else in terms of product identification.

You are not using Google analytics enhanced ecommerce

If you are not using enhanced ecommerce tracking, feel free to chose an immutable product identifier, such as SKU or your internal product ID. You will have to inlude this identifier in the product data you are pushing to Luigi's Box and also include it on your website in the product detail page.

Add the meta header for lb:id including the product identifier.

<html>
  <head>
    <meta property="lb:id" content="9293">
    ...
</script>