Sub topic 16
Promotion tracking: view_promotion and select_promotion
This chapter covers the two promotion events in GA4. They measure how often shoppers see and click internal banners, hero images, and other on-site offers. It assumes you can already build an items array, set currency and value, and send events with gtag.js or the GTM dataLayer, as covered in earlier chapters.
What promotion events measure
A promotion is any internal placement that advertises something on your own site: a homepage hero banner, a category-page tile, a "20% off shoes" strip. GA4 has two recommended events for these placements:
view_promotion: the promotion was displayed to the user.select_promotion: the user clicked or tapped the promotion.
Together they give you an impression-and-click funnel for internal marketing. This differs from campaign tracking (UTM parameters). UTMs describe how a visitor arrived at your site. Promotion events describe what the visitor saw and clicked after arriving.
The funnel sits beside the shopping funnel and feeds into it:
Promotion parameters
Promotion events use four promotion-level parameters. They are event parameters, not item parameters.
| Parameter | Purpose | Example |
|---|---|---|
| `promotion_id` | Unique ID of the promotion | `P_SUMMER_01` |
| `promotion_name` | Human-readable name | `Summer Sale` |
| `creative_name` | The specific creative (image or text variant) | `summer_banner_2x` |
| `creative_slot` | The position of the creative on the page | `featured_app_1` |
Two further parameters are often useful: location_id, which identifies where on the site the promotion appeared, and an items array. The items array is optional. Include it when the promotion advertises specific products, such as a "featured product" tile.
The four promotion parameters are often confused with each other. Use them like this:
promotion_namegroups impressions of the same offer.creative_namelets you compare two designs of that offer, as in an A/B test.creative_slotlets you compare positions, such as the top of the page against the sidebar.
Sending the events with gtag.js
Fire view_promotion when the promotion becomes visible, and select_promotion when the user clicks it. Both events use the same promotion parameters, so the two can be joined in reports.
// Fires when the banner is rendered or scrolled into view.
gtag('event', 'view_promotion', {
creative_name: 'summer_banner_2x',
creative_slot: 'featured_app_1',
promotion_id: 'P_SUMMER_01',
promotion_name: 'Summer Sale',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 1
}
]
});
// Fires when the user clicks the same banner.
document.getElementById('summer-banner').addEventListener('click', function () {
gtag('event', 'select_promotion', {
creative_name: 'summer_banner_2x',
creative_slot: 'featured_app_1',
promotion_id: 'P_SUMMER_01',
promotion_name: 'Summer Sale',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 1
}
]
});
});Notice that the example sets no value or currency. A promotion view is not a monetary event, so GA4 does not require them.
Sending the events through the GTM dataLayer
With Google Tag Manager, push the event to the dataLayer and let a GA4 event tag read the data. As with other e-commerce events, reset the ecommerce object first so values from an earlier push do not carry over.
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'view_promotion',
ecommerce: {
creative_name: 'summer_banner_2x',
creative_slot: 'featured_app_1',
promotion_id: 'P_SUMMER_01',
promotion_name: 'Summer Sale',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 1
}
]
}
});In GTM, create a Custom Event trigger whose event name is view_promotion, and a GA4 event tag with the same event name that sends the ecommerce data from the dataLayer. Repeat the pattern for select_promotion.
Deciding when to fire view_promotion
The most important design choice is the definition of a "view". There are two common approaches:
- On render. The event fires when the page loads, whether or not the user can see the banner. This is simple, but it overcounts promotions below the fold.
- On visibility. The event fires when the banner enters the viewport, for example using an IntersectionObserver. This matches the real meaning of an impression more closely, at the cost of more code.
const banner = document.getElementById('summer-banner');
let viewSent = false;
const observer = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting && !viewSent) {
viewSent = true;
gtag('event', 'view_promotion', {
creative_name: 'summer_banner_2x',
creative_slot: 'featured_app_1',
promotion_id: 'P_SUMMER_01',
promotion_name: 'Summer Sale'
});
observer.disconnect();
}
});
}, { threshold: 0.5 });
observer.observe(banner);The viewSent flag keeps the event from firing every time the user scrolls the banner in and out of view. Whichever approach you choose, use it for every promotion on the site. Mixing definitions makes click-through rates incomparable.
Common errors
- Inconsistent IDs between view and select. If
promotion_idorcreative_namediffers in spelling between the two events, they appear as separate promotions in reports. Define the values once and reuse them. - Firing
view_promotionon every carousel rotation. Rotating carousels can create many impressions per page view. Decide whether each slide counts, and keep that rule stable. - Missing
select_promotion. If the banner link opens a new page, the event may be lost when the page unloads. Test the click path in DebugView. - Putting promotion fields inside
items. In GA4, promotion fields are event-level parameters. The same names also exist as optional item-level parameters, which attach a promotion to a product line in later events such asadd_to_cartandpurchase. Event-level and item-level use are separate. Setting only the item-level field will not produce a promotion report entry forview_promotion. - Expecting revenue on promotion events. These events carry no revenue. To connect a promotion to sales, pass the promotion fields on the items in later events, or analyze the sequence of events in an exploration.
Reading the results
In the Monetization reports, the Promotions view reports metrics by promotion: items viewed in promotion, items clicked in promotion, and items purchased with the promotion attached. Promotion dimensions (promotion ID, name, creative name, creative slot) are available for these reports and for explorations. To see them, the events must arrive with the parameters spelled exactly as above. Validate in DebugView first, then check the report after processing delay, which can be up to a day.
Because the report ties promotions to items, a promotion event with no items array can appear with little or no data in item-based promotion metrics. If you need item-based promotion reporting, include the items. If you only need impression and click counts, the event counts with promotion parameters as dimensions in an exploration are enough, provided you register the parameters as custom dimensions.
Exercise
A homepage banner fires viewpromotion with creativename "heroa" and selectpromotion with creativename "HeroA". What problem does this create, and how do you fix it?
Show answer
GA4 treats the two spellings as different values, so views and clicks split into separate rows and the click-through rate cannot be calculated correctly. Fix it by defining the promotion parameter values once, in one shared constant or dataLayer variable, and using the same values in both events.
Exercise
You want to compare the click-through rate of a banner at the top of the page against the same banner in the sidebar. Which parameter should differ between the two placements, and which should stay the same?
Show answer
Keep promotionid and promotionname the same, since it is the same offer. Use different creativeslot values (for example "topbanner" and "sidebar") so the placements can be compared.