Skip to main content

πŸ”΄ Phase 1 β€” CoreΒ Β·Β Drives dynamic retargeting and catalog matching.

view_item

When to push​

When the product detail page (PDP) renders.

Push once per view. If the user switches variants without changing page, don't re-push (unless it's a distinct SKU in the catalog).

Example​

window.dataLayer.push({ ecommerce: null });
window.dataLayer.push({
event: 'view_item',
ecommerce: {
currency: 'EUR',
value: 42.00,
items: [
{
item_id: 'BIO-CRM-001',
item_name: 'Hydrating Day Cream',
item_brand: 'Biosphere',
item_category: 'Skincare',
item_category2: 'Face',
item_category3: 'Hydration',
item_variant: '50 ml',
price: 42.00,
quantity: 1
}
]
},
user_data: /* if user logged in, see Foundations */
});

Parameters​

Event level​

ParameterTypeRequired
currencystringrequired
valuenumberrequired β€” displayed product price
itemsarray (1 item)required

Item level​

  • item_id required
  • item_name recommended
  • price, quantity (= 1) recommended
  • item_brand, item_category*, item_variant recommended

Platforms​

PlatformNative eventNotes
GA4view_item
MetaViewContentcontent_ids = [item_id], content_type = 'product'
Google AdsDynamic remarketingMatches GMC id

Critical for the Meta Catalog​

The item_id you send must match exactly an id in the Meta Catalog feed, otherwise dynamic retargeting (DPA) won't match.

Pitfalls​

  • ❌ Pushing view_item on every variant swap (image carousel, color picker) β†’ event spam.
  • ❌ Missing currency or value β†’ Meta ViewContent loses value information.
  • ❌ item_id β‰  Meta Catalog id β†’ DPA audiences broken.