When using the visual labeling interface, you’re able to define custom properties that are attached to interaction events (clicks, form submissions, etc.). If you’re looking to apply custom properties to a pageview event when a page loads (and all subsequent events on this page), then you’ll need to define a Pageview Snapshot within our Events tab manually.
Using Pageview Snapshots, you can:
- Add properties (such as a logged-in state) to analyze how behavior changes when someone is logged in vs. logged out (similar to our addEventProperties API example).
- Understand how the number of items in a cart impacts consumer behavior, or add category information to all events in an eCommerce browsing experience.
- Call other client-side methods to trigger other behavior or send event data to other services when a pageview event occurs.
To attach a custom property to a pageview:
- Define an event for the pageview event of interest
Here’s an example of our use case for capturing screen dimensions with Snapshots: