dataLayer Compatibility Mode

If previously to Zaraz you were using Tag Management Software (like GTM/Tealium), and had been using the dataLayer to track events or other parameters, Zaraz offers backward compatibility. This means you can keep the current implementation you have, and Zaraz will automatically collect your events.

In such a case, you will keep using the dataLayer.push function to send data from the client-side to Zaraz:

dataLayer.push({ event: eventName, property1: value })

The only required field is event and it will be used as the name of the event you are tracking. For example, if you wish to track the same purchase event by using the dataLayer, this is how it will look like:

dataLayer.push({
  event: 'purchase',
  price: '24',
  currency: 'USD',
  transactionID: '12345678',
})

To enable dataLayer Compatibility Mode, make sure the “Activate dataLayer Compatibility Mode” switch at your account settings is on.