templates/scripts/e_commerce_match_detail_script.html.twig line 1

Open in your IDE?
  1. {#// Measure a view of product details. This example assumes the detail view occurs on pageload,#}
  2. {#// and also tracks a standard pageview of the details page.#}
  3. <script>
  4.     window.dataLayer = window.dataLayer || [];
  5.     dataLayer.push({
  6.         'ecommerce': {
  7.             'detail': {
  8.                 'actionField': {'list': 'Wedstrijd Detail'},    // 'detail' actions have an optional list property.
  9.                 'products': [{
  10.                     'item_name': '{{ match_title }}',         // Name or ID is required.
  11.                     'item_id': '{{ match_id }}',
  12.                     'price': '{{ match_price }}',
  13.                     'item_brand': 'Voetbalretour',
  14.                     'item_category': ''
  15.                 }]
  16.             }
  17.         }
  18.     });
  19. </script>