Skip to content

Google Ads View Item Events

Matt MacDougall edited this page Sep 9, 2026 · 2 revisions

Google Ads view_item events

The configurable-product integration dispatches a view_item event when a complete option selection resolves to an associated product. It exposes a custom browser event for consent and tag-manager integrations, and can call gtag directly when enabled.

This event bridge uses Magento's RequireJS integration. Version 1.0.0 supports native Hyva configurable deep-link selection, but does not add a Hyva Google Ads event bridge. Verify or provide a separate theme integration before relying on events there.

Documentation baseline: release v1.0.0. Last reviewed: 2026-09-09.

Event data

The event detail contains:

{
  "value": 29.99,
  "items": [
    {
      "id": "CHILD-SKU",
      "google_business_vertical": "retail"
    }
  ]
}

value comes from the selected option's final price. The item ID uses the associated product SKU when available.

Custom event

After a new complete selection, the module dispatches:

mageos:shopping-feed:view-item

This browser event is dispatched independently of direct gtag delivery. A consent platform or tag manager can listen for it and decide when or whether to forward the data.

Direct Google tag delivery

To permit a direct Google tag call:

  1. Open Stores > Configuration > Mage-OS > Mage-OS Shopping Feed.
  2. Set Enable Google Ads Dynamic Remarketing Events to Yes.
  3. Optionally set Google Ads Destination ID, such as AW-123456789.

If window.gtag exists, the module calls:

gtag('event', 'view_item', eventData)

When a destination ID is configured, the event includes send_to. Leave it empty when Google Tag Manager or another integration owns routing.

Consent boundary

The module does not install a Google tag or a consent-management platform. The storefront must load and govern those systems. Do not enable direct delivery until the site's consent behavior has been reviewed for the applicable jurisdictions and policies.

Duplicate protection

The script remembers the last resolved product ID and does not emit another event for the same selection until the resolved child changes.

Verify

  1. Test a configurable product with swatches.
  2. Test one with dropdowns.
  3. Confirm no event fires for an incomplete selection.
  4. Confirm one event fires when a new child resolves.
  5. Confirm ID and value match the selected child.
  6. Confirm the consent and tag-manager behavior in allowed and denied states.

See Google's current dynamic remarketing documentation for the receiving platform requirements.

Clone this wiki locally