Google Tag Manager Customer Event Pixel - Click Tracking?

Topic summary

Main issue: After switching from the legacy GTM script (in theme.liquid and checkout additional scripts) to a Shopify Customer Event Pixel, click tracking via Google Tag Manager (GTM) appears not to work, and GTM Preview doesn’t detect the tag when loaded through the pixel.

Details: The goal is to track clicks (e.g., buttons/links) alongside checkout_completed via the new pixel. It’s unclear whether the pixel supports GTM-based click triggers without explicit event subscriptions.

Updates: Another user reports the same problem. The original poster temporarily reverted to the regular GTM script to restore click tracking.

Workaround shared: One participant bypassed GTM and directly sent navigation click events to Google Analytics 4 (GA4) via gtag in theme code. The snippet adds click listeners to navigation containers and fires a ‘navigation_click’ event with category, label (href), and location (mobile/desktop). They note it needs further testing.

Key terms: GTM = Google Tag Manager; GA4 = Google Analytics 4; Shopify Customer Event Pixel = Shopify’s new customer events mechanism.

Status: No confirmed solution for enabling GTM click tracking via the Shopify pixel. Discussion remains open; testing and validation are ongoing.

Summarized with AI on December 15. AI used: gpt-5.

Hi all,

We are switching to a customer event pixel for GTM as additional scripts is being deprecated and we need tracking on the checkout. This part of it is fine - I’ve simply subscribed to the checkout_completed event. However, we also use GTM for click tracking and it’s not clear to me if the custom pixel supports this? I’m not sure how to test it, as preview mode in GTM doesn’t detect the script when it’s part of a pixel.

Any help would be very much appreciated. Thanks in advance.

Hello Sebastian_young,

Thanks for your query.

could you please share your website URL? I would love to check.

Please specify which click you want to track?

If you want to track any button or link click you can track easily by Google Tag manager.

Feel free to ask if you have any questions.

Thanks

Hi @Sam_Mahmud , thanks for your reply. Just to be clear, we already have click tracking set up in GTM and previously this was working via the regular GTM script, which was inserted in theme.liquid and additional scripts for checkout. We have now replaced these both with a customer event pixel and it’s not clear to me if click tracking will continue to work without subscribing to events, but I’m not sure how that would work for click tracking.

Hello @Sebastian_Young ,

Did you have any luck in sorting this out? I’m found with the same issue, click tracking from GTM does not seem to work.

@adidedic Nope unfortunately not, we’re still looking into it. For now we have gone back to using the regular GTM script rather than a Pixel.

I might have just solved it for my needs, but needs a bit more testing to be sure. So I wanted to be able to know when users interact with navigation, meaning that I’m just interested in navigation click events and I’m just doing this directly in the theme code by sending click data to GA4 directly. Here’s the code if it can be of use to you.

// Define the navigation container selectors
const navSelectors = ['.site-nav', '.mobile-nav'];

// Add event listeners for click events within specified navigation containers
navSelectors.forEach(selector => {
    const navContainer = document.querySelector(selector);
    if (navContainer) {
        navContainer.addEventListener('click', event => {
            const clickedElement = event.target;

            // Check if it's a link or another clickable element within the nav
            if (clickedElement.matches('a') || clickedElement.closest(selector)) {
                console.log('Navigation click:', clickedElement);
                
                // Send event to GA4
                gtag('event', 'navigation_click', {
                    event_category: 'navigation',
                    event_label: clickedElement.href || 'non-link element',
                    location: selector.includes('mobile') ? 'mobile' : 'desktop'
                });
            }
        });
    }
});