view_promotion Event
The view_promotion
event tracks when a promotional banner or campaign element is viewed by the user. It's commonly used to measure the performance of homepage carousels, on-site campaigns, or seasonal offers.
The view_promotion model
This model defines the structure of a viewed promotion item.
Properties
- Name
event
- Type
- string
- Description
Must be set to
view_promotion
.
- Name
user_id
- Type
- string
- Description
Unique identifier for the viewer.
- Name
session_id
- Type
- string
- Description
ID of the current session.
- Name
promotions
- Type
- array
- Description
Array of promotion objects.
- Name
promotions[].promotion_id
- Type
- string
- Description
ID of the promotion.
- Name
promotions[].promotion_name
- Type
- string
- Description
Display name of the promotion.
- Name
promotions[].creative_name
- Type
- string
- Description
Name of the creative or visual element.
- Name
promotions[].creative_slot
- Type
- string
- Description
Placement slot (e.g.,
banner_top
,sidebar
).
- Name
promotions[].location_id
- Type
- string
- Description
Optional location ID to track promotion context.
Push event to the dataLayer
dataLayer.push example
dataLayer.push({
event: 'view_promotion',
user_id: 'user-888',
session_id: 'session-xyz',
promotions: [
{
promotion_id: 'spring-sale-2025',
promotion_name: 'Spring Sale 2025',
creative_name: 'Homepage Hero Banner',
creative_slot: 'banner_top',
location_id: 'home_page'
}
]
});
Best Practices
- Track all viewed promotions, not just clicked ones.
- Ensure creatives and slots are consistently named.
- Use
location_id
for dynamic promotion testing and optimization.
Use Cases
The view_promotion
event supports:
- A/B testing for promotions
- Measuring impression-to-click rates
- Attribution for promotion-driven conversions
- Campaign performance breakdowns