APSIS DataLayer is used to track your e-commerce data. In order to use this building block, a data layer has to be created on the site such as a JSON object, meta tags, hidden tags or any other data layer of your choice. The data layer has to be structured in a certain way.  At the bottom of this article, a guide is provided of how to create the data layer.


Two building blocks are used to cover e-commerce data.

  1. Order - is covering all data around the order in terms of order ID, price, currency, tax, Etc.
  2. Products – is covering product category, product name, SKU number, number of units, unit price Etc.

Drag the building blocks to the “Event data” area and select the relevant categories.


If the data layer has been implemented on the site each of above building blocks will automatically pick up the data. Connect each value with the relevant plugin such as Google analytics plugin or Sitecatalyst plugin.


DataLayer is to be structured as follow: 

(note: below example shows 2 products.)


APSISDataLayer = {
                "order":{
                                "id":"XXXXX",
                                "country":"XX",
                                "city":"XXXXXX",
                                "state":"XXXXXX",
                                "currency":"XXX",
                                "tax":"XXXX",
                                "total":"XXXX"
                },
                "product":[
                {
                                "sku":"XXXX",
                                "name":"XXXXXXXXXX",
                                "category":"XXX",
                                "unit_price":"XXXXXX",
                                "units":"X"
                },
                {
                                "sku":"XXX",
                                "name":"XXXXXX",
                                "category":"XXX",
                                "unit_price":XXXXX,
                                "units":X
                }
                ]

};


  


The data layer object on the website has to include all categories even if it is not applicable to you. Fill the categories that is not applicable to your data with any value, such as N/A, Null, Undefined or any other value of your choice.