Final eventΒΆ

An important aspect of the data model is the fact that with little information from the developer in the datalayer, we can create a rich and extensive data object.

Before you read further, it is recommended to read the tracking code documentation, so you know more about how the tracking of Harvest Collect works.

It is also recommended to read our console debugging documentation to understand how you can see yourself how the data object is generated.

As an example, we demonstrate tracking of pageview. Before you trigger the pageview, set debugging on in the console.

harvest.trackEvent({
    "event":"pageview",
    "data": {}
});

After you executed the code above in the console, you will notice that the function returned an array of objects. In this case with 1 object, because we only triggered one event.

../../_images/final-event.PNG

As you can see, we sent only little information to harvest.trackEvent, but we got a complext data object back. You can zoom in on each data object for now, and will notice many default variables, as mentioned in our meta data documentation.

You will notice the following properties:

  1. event - This tells us what event type generated the event.
  2. consentData - This contains all information about consent.
  3. debugData - This contains all information about the user agent and screen. Relevant information for debugging.
  4. eventData - This contains all information relevant for this specific event. All uncategorized variables will stay in eventData.
  5. pageData - This contains all information relevant to the current page.
  6. userData - This contains all information relevant to the current user.
  7. sesionData - This contains all information relevant to the current session.
  8. funnelData- This contains all information relevant to the curent funnelstep.
  9. promotionData - This contains an array of promotions that were viewed or clicked on. Only available when promotions are tracked.
  10. productData - This contains an array of products that were viewed or clicked on. Only available when products are tracked.
  11. contentData - This contains an array of contents that were viewed or clicked on. Only available when contents are tracked.
  12. toolData - This is a special object, it contains all tool configurations.

Especially toolData can be handy to see what decisions Harvest Collect made for your tools. For more information read our tool configurations documentation.