Tracking and Analytics
Vev takes an agnostic approach to analytics and does not directly track visitors on Vev-created content or pages. However, we offer tools and methods to help you implement your preferred tracking solutions. This can be done through our hosting integrations or by using event tracking as described in this article.
Integration
To implement event-based tracking, you need to listen for all Vev tracking events. This is done by listening for the vev.track event on the window object. Once captured, you can forward the event data to your preferred tracking tool, internal data repository, or any similar system.
window.addEventListener('vev.track', (e) => {
const event = e.detail;
console.log('event', event);
});Example: Adobe Analytics Implementation
window.addEventListener('vev.track', (e) => {
const event = e.detail.data;
// Example: Send to Adobe Analytics
alloy('sendEvent', {
type: event.type,
data: {
...event.data,
vevProjectKey: event.metaData.projectKey,
vevPageKey: event.metaData.pageKey,
},
});
});Event data structure
Vev offers two methods for creating tracking events: standard events and interaction-based event tracking. The data object is unique to each event type, while metaData remains consistent across all events.
| Key | Description |
|---|---|
| type string | A string to identify the event |
| data object | Specific data for the event. |
| metaData object | projectKey string pageKey string timestamp number |
Standard events
| Type | Description | Data object |
|---|---|---|
| VEV_PROJECT_LOAD string | Dispatches when the project loads | projectKey string projectName string breakpoint string |
| VEV_PAGE_LOAD string | Dispatches when the page load | pageKey string pageName stringprojectKey string breakpoint string |
| VEV_LINK_CLICK string | Dispatches when an external link is clicked | url string |
| VEV_VIDEO_PLAY string | Dispatches when an video is started | videoUrl string totalPlayTime number (seconds) percentagePlayed number (percentage) |
| VEV_VIDEO_STOP string | Dispatches when an video is stopped or paused | videoUrl string totalPlayTime number (seconds) percentagePlayed number (percentage) |
| VEV_VIDEO_END string | Dispatches when an video is fully played. | videoUrl string totalPlayTime number (seconds) percentagePlayed number (percentage) |
| VEV_VIDEO_PROGRESS string | Dispatches the progress of a video in seconds. | videoUrl string videoName string progress number (seconds) totalPlayTime number (seconds) percentagePlayed number (percentage) |
Custom events
Custom events can be added using interactions. For these events, the type and data are defined by the designer within the design editor. Custom events can be linked to various interaction triggers, such as onVisible, onScroll, and more. They are typically used for tracking call-to-action (CTA) interactions.
![]()