Skip to content

Data Layer API ​

An API for interacting with the Verada JavaScript library.

Verada's data API is a simple javascript array which can be used to store and send information to the Verada Platform. It can be used alongside the standard Verada integration to track additional information in your store.

Note: The array must be defined and populated with values BEFORE the standard Page tracking snippet is executed.

Examples ​

Tracking additional page properties ​

In the following example, two additional properties named brand and color are captured along with the standard information Verada tracks for page views.

The special _type property informs Verada that the information should be stored with the page view.

html
<!-- Before user tracking snippet -->
<script>
  window.fanplayr_api = [
    {
      _type: 'page.data',
      brand: 'Super',
      color: 'red'
    }
  ];
</script>