Overview
Most online stores have a similar set of page templates, events and funnels. Therefore, the process of integration of the digitalData data layer is similar for all ecommerce projects. In this section, we will analyze the composition of the window.digitalData
object for all typical pages of the online store:
- Home page
- Product category
- Search results
- Product page
- Cart
- Checkout process page
- ‘Thank You’ page
- Content page
The composition of the
digitalData
object depends on the type of the page (digitalData.page.type
) and the content of the page. For example, if there is a list of recommendations on the main page of the site, you need to declare and fill out thedigitalData.recommendation
array.
The
digitalData.page
,digitalData.user
,digitalData.cart
,digitalData.version
anddigitalData.website
variables must be declared and filled on every page.