How to Track Banner and Promo-Block Clicks in GA4 on Magento 2

|Dan Giura
How to Track Banner and Promo-Block Clicks in GA4 on Magento 2

TL;DR

Banner tracking on Magento 2 turns on three decisions. Google asks for consistent promotion names and IDs, and whether a banner carries the products it promotes decides if it appears in GA4's Promotions report at all. The third is your edition, because the association between a click and the purchase is a PRO feature. The mechanics in between are one admin switch, a container republish and a check in the dataLayer preview window.

Key Takeaways

  • Tag the link with four attributes, data-track-promo-id, data-track-promo-name, data-track-promo-creative and data-track-promo-position, and set Promotion Tracking to Yes [1].
  • Fix the IDs and names before the first block is tagged; Google asks for them to be assigned consistently [4].
  • view_promotion requires items, and a select_promotion without items is left out of the Promotions report [2]. Since v1.14.5 the extension can send items with both events [1].
  • After any configuration change, regenerate the JSON, re-import it into Google Tag Manager and publish [1].
  • Tagging and the widget are in both editions. Since v1.15.7 (PRO), purchases of products tied to a clicked promotion carry the promotion parameters, and the change log names Purchase only [1].
  • Run v1.17.5: it carries every promotion fix in the change log, including the v1.16.1 DB-load fix and the v1.17.5 endpoint hardening [1].

Name the promotion before you tag anything

Every value you type into a banner becomes a label in GA4, and two spellings of one campaign become two rows. Google leaves the naming to you with one condition: "make sure you assign the names and IDs consistently across your site or app" [4]. If you have inherited a property where three people tagged the same sale three different ways, you already know why this comes first.

A convention that holds up, shown on an illustrative home page hero for a fall outerwear campaign:

Attribute What it should hold Illustrative value
data-track-promo-id The campaign, identical on every block that runs it FW26-OUTERWEAR
data-track-promo-name A readable campaign name Fall Outerwear Edit
data-track-promo-creative The asset, so two designs of one campaign can be compared hero-model-v2
data-track-promo-position The slot on the page home-hero-1

A shared sheet with one row per live banner is enough to keep merchandisers on the same list.

Scope, before going further: this covers internal merchandising promotions, meaning banners, CMS blocks and slider slides that send shoppers elsewhere in your own store. Coupons and discount value ride on the purchase event and are covered in our article on what your old dataLayer still gets wrong. The two events themselves are defined in which ecommerce events the extension tracks.

Does the banner need its products attached?

For most banners, yes. In Google's event reference, items is required on view_promotion. On select_promotion it is optional with a condition: "If the items array is not included, then some reports, such as the Promotions report, and metrics won't include this promotion event" [2]. Google's ecommerce guide describes the same pattern, measuring the impression with view_promotion and an items parameter, then the click with select_promotion and that item [3].

So ask what you want to learn from each banner.

What you want to know What GA4 needs Route in the extension
Whether the banner gets clicked, and from which slot The promotion event with your four values The four attributes on the link [1]
Which promoted products were viewed, clicked and bought Items on the promotion events [2] HTML structure or the GA4 Promo Link Widget, since v1.14.5 [1]
Purchases that followed a click The promotion carried on later ecommerce events [4] The PRO purchase association, since v1.15.7 [1]

The v1.14.5 release, July 22, 2024, added items "either via HTML structure or via the dedicated GA4 Promo Link Widget" [1]. The user guide prints the markup for the four promotion values but not the structure for attaching items, which makes the widget the practical route; Magento's widget procedure covers where to place it [6].

Tagging the block: markup or the widget

For a hand-coded banner, the user guide gives this example under Promotion Tracking [1]:

<a href="#" data-track-promo-id="PROMOID"
   data-track-promo-name="PROMONAME"
   data-track-promo-creative="PROMOCREATIVE"
   data-track-promo-position="PROMOPOSITION">Content
</a>

Swap the placeholders for the values from your naming table and keep the attributes on the link itself, the element a shopper clicks. In Page Builder, Adobe's HTML Code content type is the element for adding a snippet of HTML, with a banner among its own examples [7]. After saving, open the storefront page source and confirm all four attributes survived.

For a banner that promotes specific products, use the widget. Magento's own procedure applies: Content > Elements > Widgets, Add Widget, set the Type to the GA4 Promo Link Widget, choose store views under Storefront Properties, then place it under Layout Updates with Display On and Container [6]. Configure it with the values from your naming table and the products the banner promotes.

Turning it on means republishing the container

The switch is at WeltPixel > Google Analytics 4 Ecommerce > General Configuration: set Promotion Tracking to Yes and save [1]. The tags in Google Tag Manager come from a JSON file the extension generates from your settings, so the switch alone is not picked up by Google until the container is re-imported and published [1].

  1. Under JSON Export Options, fill in your Public ID, click Generate Json for Variables, Triggers and Tags and download the file [1].
  2. In Google Tag Manager, open Admin, choose Import Container, and pick a workspace and an import option [1].
  3. Confirm the preview of changes.
  4. Publish the container.

The guide's route is re-import and overwrite, and overwriting removes the tags, triggers and variables already in that workspace, so check what it holds first [1]. Step 4 is the one that gets skipped, and the guide is blunt about it: "If the container is not published/submitted in your GTM account, no tracking will be available" [1].

The promotion events in this guide ride the GTM container, so they follow the GA4 configuration's consent handling (with Magento Cookie Restriction Mode, the default, the container loads only after the shopper accepts cookies). Events from the GA4 Measurement Protocol and the Conversions API addons wait for consent only since v1.17.4, with Require Visitor Consent for Server-Side Events switched on (it is off by default) [1], and our guide to making server-side events respect consent covers the per-addon details.

How do you check what a page load actually sent?

Set Enable dataLayer frontend Preview/Debug to Yes. It adds a button that opens a storefront preview window showing the current dataLayer values as they update [1]. Load the page with the tagged banner and find view_promotion, click the banner and find select_promotion, and check that your four values and the items appear as intended. Then confirm the same events in GA4's DebugView; the full toolkit is in our guide to verifying GA4 events on Magento 2.

One more count before you trust the numbers. Compare how many view_promotion pushes one page load produces with how many banners a visitor can actually see. On a slider, check whether slides that have not rotated into view yet already produced a view. GA4 defines the Promotions report's click-through rate as "the number of users who selected a promotion divided by the number of users who viewed the same promotion" [5], so every view nobody saw lowers the rate. If the counts differ on your store, compare banners with the same exposure and leave the absolute rate alone.

When does a banner click count toward revenue?

Google's rule is specific. To measure a purchase that follows a promotion view or click, add at least one of promotion_id or promotion_name "to every subsequent ecommerce event" [4]. A click event on its own only says the banner was clicked.

The extension handles part of this. v1.15.7, September 2, 2025, a PRO feature: "Purchase events of products associated with clicked promotions are updated to include Promotion Tracking parameters" [1]. Two limits go with it. The change log names Purchase only, so whether add to cart or begin checkout carry the promotion is not documented. And no length is published for how long a click stays associated with a later purchase, so test it on your own store before you build a report around a window you assumed.

The tier line is clean. The feature list's promotion impressions, promotion clicks and Internal Promotion Widget entries carry no PRO mark, and the product page ticks them for both editions [1] [8]. The purchase association is PRO; our comparison of GA4 Standard vs PRO on Magento 2 covers the rest of the split.

The results land in Google's Promotions report, "a pre-made detailed report that shows the impact of each promotion on purchases and revenue", at Reports > Life cycle > Monetization > Promotions [5]. Its dimensions are Item promotion creative name, ID and name plus Item list position, and its metrics include Items viewed in promotion, Items clicked in promotion and Item revenue [5]. Those dimensions are item-scoped: GA4 reads the promotion values on each item first and falls back to the event-level values when an item has none [2].

Which version should you run?

The change log dates every promotion fix, and read in order it sets the version floor.

Release Date What changed for promotions
v1.11.19 March 23, 2023 Fixed an issue that would prevent Promotion Tracking events from firing
v1.14.9 November 14, 2024 Fixed a PHP 8.x error sometimes thrown by Promotion Tracking
v1.15.1 May 17, 2025 Fixed an issue that prevented the View Promotion event from firing
v1.16.1 March 6, 2026 Fixed a Promotion View bug that, "in some extreme cases", caused "a heavy DB load/delay via an UPDATE query"
v1.17.5 September 16, 2026 Promotion view and click endpoints cap the promotions and product ids processed per request

Every row comes from the GA4 change log [1]. v1.16.1 is the load fix. v1.17.5 hardened the promotion endpoints "so a single crafted request can no longer drive unbounded product loads" [1], as part of a catalog-wide security update summarized in our September 2026 release notes. Getting there with patches in flight is covered in our guide to upgrading Magento 2.4.x without breaking your analytics.

FAQ

Do I need PRO to track banner clicks?

No. Tagging, items since v1.14.5 and the GA4 Promo Link Widget are in both editions [1] [8]. PRO adds the v1.15.7 association that puts the promotion parameters on purchases of products tied to a clicked promotion [1].

How long after a click does a purchase still count for the promotion?

That length is not documented. Place a test order at the interval you care about and check the purchase event in DebugView before you report on it.

Why is my banner click-through rate so low?

Start with the denominator. GA4 divides users who selected a promotion by users who viewed it [5], so count the view_promotion pushes a page load produces against the banners a shopper can actually see.

Can one campaign run in several slots?

Yes. Keep data-track-promo-id and data-track-promo-name identical everywhere it runs and change only the creative and position values, so every placement shares one campaign ID and name [4].

Promotion Tracking, the GA4 Promo Link Widget and, in PRO, the purchase association ship in the Magento 2 Google Analytics 4 extension, currently v1.17.5, released September 16, 2026 [1].

Sources

  1. WeltPixel Google Analytics 4 User Guide and Change Log (General Configuration; JSON generation and container import; change log v1.11.19 to v1.17.5), v1.17.5, September 16, 2026, retrieved September 29, 2026, https://docs.weltpixel.com/GA4/User-Guide-WeltPixel-Google-Analytics-4.html
  2. Recommended events reference (select_promotion, view_promotion), Google Analytics developer documentation, page last updated September 16, 2026, retrieved September 29, 2026, https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
  3. Measure ecommerce (apply promotions), Google Analytics developer documentation, page last updated August 19, 2026, retrieved September 28, 2026, https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm
  4. [GA4] Set up ecommerce events (Promotions), Google Analytics Help, retrieved September 29, 2026, https://support.google.com/analytics/answer/10956545
  5. Promotions report, Google Analytics Help, retrieved September 29, 2026, https://support.google.com/analytics/answer/13458990
  6. Create a widget, Adobe Commerce Admin Guide, retrieved September 28, 2026, https://experienceleague.adobe.com/en/docs/commerce-admin/content-design/elements/widgets/widget-create
  7. HTML Code, Adobe Commerce Page Builder guide, retrieved September 28, 2026, https://experienceleague.adobe.com/en/docs/commerce-admin/page-builder/elements/html-code
  8. Magento 2 Google Analytics 4 extension product page (Standard and PRO feature comparison), WeltPixel, retrieved September 28, 2026, https://weltpixel.com/products/magento-2-google-analytics-4-ga4-extension-with-gtm-server-side-tracking

Ready to upgrade your tracking?

Server-side tracking for Magento and Shopify — accurate data, better attribution, full privacy compliance.