DataLayer integration

Ricerca, Allow to fire events to GTM datalayer.

To enable this feature, please go to: General then enable “Allow to fire ricerca’s events to GTM datalayer” checkbox.

GTM main code is required to be installed on the website. This feature uses to push DataLayer events,

Here are the list of events we fire:

On search any term:


      dataLayer.push({
        'value': 'Shirt',
        'event': 'search'
      });
  

Any item shown in search result we push the event:

  dataLayer.push({
    event: "view_promotion",
    ecommerce: {
      creative_name: 'shirt',
      promotion_id: "ricerca",
      promotion_name: "ricerca search",
      items: [
        {
          item_id : 'sku-fre8j',
          affiliation : 'ricerca search',
          item_name : 'shirt',
          price : '1000.00',
          quantity : 1,
        }
      ]
    }
  });

On click on any item in search result we push:


  dataLayer.push({
    event: "select_promotion",
    ecommerce: {
      creative_name: 'shirt',
      promotion_id: "ricerca",
      promotion_name: "ricerca search",
      items: [
        {
          item_id : 'sku-fre8j',
          affiliation : 'ricerca search',
          item_name : 'shirt',
          price : '1000.00',
          quantity : 1,
          coupon: "",
          discount:0,
          index: 0,
        }
      ]
    }
  });