How to Track Product-List Clicks (select_item) on a Custom Magento 2 Theme

|Dan Giura
How to Track Product-List Clicks (select_item) on a Custom Magento 2 Theme

TL;DR

Product-click tracking swaps in its own listing template, so a theme that ships its own copy collides with it. Confirm the version, the dataLayer and the rendering template, in that order, before you edit anything. The documented fix predates Composer-only installs, and every product grid needs its own check afterwards.

Key Takeaways

  • Measure Product Clicks covers Category and Search pages plus the Related, Up-Sell and Cross-Sell grids, and it replaces two templates to do it [1].
  • Run the checks in order: version, then the click in the dataLayer preview, then template path hints to see which listing template renders [1] [5].
  • The fix has three moves, and on PRO with server-side product clicks the third is mandatory: without it, the server-side click layout keeps rewriting your listing [2] [4].
  • Since v1.16.0 the extension installs only through Composer [1], so no edit inside the installed extension survives composer update.
  • Click a product image and a product name on every grid; the documented markup goes on the image link [2].

Why does select_item go quiet on a custom theme?

The user guide states the mechanism in one line. Measure Product Clicks "allows 'Product Click' tracking on Category and Search pages, as well as on Related, Up-Sell and Cross-Sell product grids", and when it's enabled "it rewrites the Magento_Catalog::product/list.phtml" template along with the one behind the related, up-sell and cross-sell grids [1]. The guide then sends anyone "using a custom theme/extension that already rewrites these templates" to a compatibility article.

Magento sets a block's template in layout or in the block class, and theme templates override module templates only "for template files with the same name" [3]. When a theme and the extension each assign their own listing template to the same block, one assignment wins, and you see one of the two symptoms our support article opens with: a broken product grid or untracked actions [2]. If the extension wins, the grid loses your theme's markup. If the theme wins, the grid looks right and the click markup the extension depends on never reaches the page, so select_item stays at zero.

Google defines select_item as the event that "signifies an item was selected from a list", with items required and an index for the item's position in the list [7]. The event itself is defined in our article on which ecommerce events the extension tracks.

Our support article guarantees full compatibility with default Magento 2 and our Pearl Theme; other themes may customize the listing templates and need adjustments [2].

Three checks before anyone edits a template

Run them in this order; each one rules out a cheaper explanation than the next.

Check How What the result means
1. Version Compare the installed version with the change log Two releases fixed faults on the click path itself; run v1.17.5 before debugging further
2. dataLayer Set Enable dataLayer frontend Preview/Debug to Yes, open a category page and click a product A push means the click is captured and the problem sits downstream; no push points at the template
3. Template Turn on template path hints and read the label on the product grid A label from your theme or another extension means the extension's template isn't the one rendering, so its click markup is missing unless someone added it

On check 1, v1.12.11 (October 12, 2023) fixed server-side select_item failing when a category name contained a " character, and v1.14.7 (August 29, 2024) added a nonce for Magento's CSP requirements to a checkout script tied to Measure Product Clicks and fixed a PHP 8 error on the home page with the option enabled [1]. No change log entry from v1.14.9 through v1.17.5 names Measure Product Clicks or Select Item. Our guide to upgrading Magento 2.4.x without breaking your analytics covers getting current with patches in flight.

On check 2, the preview window "shows the current values of the dataLayer and is updated as the dataLayer is updated" [1]. If the push is there but GA4 shows nothing, follow our guide to verifying GA4 events on Magento 2 and leave the theme alone.

Check 3 is Magento's own diagnostic. Template path hints add "notation with the path to each template that is used on the page" [5]. They can be switched on in developer mode only, so do this on staging. First add your IP under Stores > Settings > Configuration > Advanced > Developer > Developer Client Restrictions, then set Enabled Template Path Hints for Storefront to Yes in the Debug section of the same page, and clear the cache when you're done [5].

Impression Chunks Size splits the view_item_list payload [1] and isn't a click fix; our article on what your old dataLayer still gets wrong covers it.

The fix in three moves

The exact file locations and the snippet are in our support article, How to solve compatibility issues - Google Tag Manager Enhanced eCommerce and Google Analytics 4 [2]. Hand it to whoever maintains your theme. Its GA4 section, in outcome terms:

  1. Stop the extension replacing your listing template. Your theme's template renders the grid again.
  2. Give your theme's own listing template the click markup. The snippet goes on the product image link in your theme's copy of Magento_Catalog::product/list.phtml and prints the extension's product-click attribute only while product-click tracking is enabled [2].
  3. On PRO with server-side product clicks, override the server-side click layout with an empty one. The server-side click path has its own layout, and the article empties it "so it no longer rewrites your listing" [2]. Your theme carries an overriding copy of that layout with the body cleared. That's Adobe's base-layout override, which lists "removing all handle instructions by declaring an overriding layout file with an empty handle" among its uses [4].

Then upload the changed files, flush every cache, and deploy static content if your setup needs it [2].

Move 3 is the one a theme developer misses. A store that sends select_item server-side, a PRO feature since v1.11.11 (November 11, 2022) [1], can finish moves 1 and 2 and still have the server-side click layout rewrite the listing. Our comparison of GA4 Standard vs PRO on Magento 2 covers which tier sends what.

Where should the edit live on a Composer install?

Move 1 edits a file inside the installed extension [2]. The help center copy was last updated on September 16, 2025. Since v1.16.0 (January 7, 2026), Composer is "the official and singular installation method for all WeltPixel products" [1]. Composer downloads packages into the project's vendor directory, "the conventional location for all third-party code in a project" [6], and the guide's upgrade step is composer update [1], which brings in a fresh copy of the extension, so that edit is gone after the next update and the grid can go back to the broken state.

Moves 2 and 3 live in your theme and survive updates. Move 1 has to be implemented by your developer in the theme or in your own code, somewhere an update doesn't overwrite. Whichever way they do it, put a select_item check on the list of things you test after every extension update.

Which surfaces need a check after the fix?

The option covers more surfaces than the article patches. Run each row on staging with the preview window open.

Surface Click If it stays silent
Category page A product image Move 2 didn't reach the template that renders the grid; repeat check 3
Category page A product name The documented markup sits on the image link; ask your developer to cover the name link too
Search results An image and a name Same as the category rows; the option covers search pages too [1]
Related, up-sell and cross-sell grids A product in each Second template, not patched by the article; same markup needed (see FAQ)
PRO server-side copy Any product Check ga4.log, then confirm Select Item is in the Measurement Protocol Track Events list [1]

If you send select_item server-side, the guide's Measurement Protocol rule applies: track each event on one side only, or it's counted twice. Automatically disable data layer for enabled measurement protocol events does that for you, and with it on, the preview window shows no select_item push, so check 2 reads ga4.log instead, with Enable File Log on [1].

Client-side select_item rides the GTM container, so it follows the Consent Management Method set in the GA4 configuration (with Magento Cookie Restriction Mode, the default, the container loads only after the shopper accepts cookies), while the PRO server-side copy is gated on the shopper's consent choice only since v1.17.4 and only with Require Visitor Consent for Server-Side Events switched on, which is off by default [1]; our guide to making server-side events respect consent has the details.

When the theme rebuilds the category page

Some themes replace far more than the listing template. For those, the support article says it outright: "We don't have a universal, conflict-free solution for all themes that customize Category Page layouts", and a developer may need to adapt where the snippet goes or adjust other blocks [2].

Hyvä stores take a different route, the PRO compatibility modules, which install through Composer and have "no configuration options" [1]. Our article on GA4 compatibility with the Hyvä theme covers that path.

FAQ

Does Load Product List Block bring product clicks back?

The guide documents it for a different symptom: ignored product limits per page or incorrect sorting on Category and Search pages, usually with a third-party search engine or a customized listing [1]. Diagnose missing clicks with the three checks above.

Do I need PRO for product-click tracking?

Client-side product clicks on category, search and the related, up-sell and cross-sell grids carry no PRO mark in the feature list [1]. Sending select_item through the Measurement Protocol is PRO, since v1.11.11 [1].

Why does select_item fire on the category page but not in the cross-sell block?

The related, up-sell and cross-sell grids render through a second template [1], and the support article's markup goes into the listing template only [2]. Your developer has to give the grid template the same click markup.

Product-click tracking, including the PRO server-side select_item, ships in the Magento 2 Google Analytics 4 extension, currently v1.17.5, released September 16, 2026 [1]. Plan the theme compatibility step before you switch it on.

Sources

  1. WeltPixel Google Analytics 4 User Guide and Change Log (General Configuration; Measurement Protocol Tracking Configuration; How to Install and How to Upgrade; Hyvä compatibility; change log v1.11.11 to v1.17.5), v1.17.5, September 16, 2026, retrieved October 6, 2026, https://docs.weltpixel.com/GA4/User-Guide-WeltPixel-Google-Analytics-4.html
  2. How to solve compatibility issues - Google Tag Manager Enhanced eCommerce and Google Analytics 4 (section B, Google Analytics 4), WeltPixel Help Center, updated September 16, 2025, retrieved October 6, 2026 (linked in "The fix in three moves")
  3. Template override, Adobe Commerce Frontend Developer Guide, retrieved October 6, 2026, https://developer.adobe.com/commerce/frontend-core/guide/templates/override
  4. Override a layout, Adobe Commerce Frontend Developer Guide, retrieved October 6, 2026, https://developer.adobe.com/commerce/frontend-core/guide/layouts/override
  5. Developer tools (Developer Client Restrictions, Template Path Hints), Adobe Commerce Admin Systems Guide, last updated August 20, 2026, retrieved October 6, 2026, https://experienceleague.adobe.com/en/docs/commerce-admin/systems/tools/developer-tools
  6. Basic usage, Composer documentation, retrieved October 6, 2026, https://getcomposer.org/doc/01-basic-usage.md
  7. Recommended events reference (select_item), Google Analytics developer documentation, page last updated September 16, 2026, retrieved October 6, 2026, https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag

Ready to upgrade your tracking?

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