Goolge tag not on all pages just the first

Topic summary

A Shopify store owner is struggling to implement Google Tag Manager (GTM) across all site pages to track JotForm submissions for conversion attribution (Google Ads, etc.). The GTM code was added via custom pixel but isn’t visible in Tag Assistant, though this is reportedly common with Shopify.

Key Issues:

  • GTM analytics only fires on the first page, not subsequent pages
  • JotForm submissions aren’t appearing in GA4 real-time reports
  • Tag Assistant doesn’t detect GTM on the site

Recommended Solutions:

  1. Ensure GTM container snippet is in theme.liquid (both <head> and after opening <body> tag)
  2. Add multiple event listeners for page views:
    • DOMContentLoaded event as fallback
    • shopify:section:load for dynamic page transitions
  3. Implement custom JavaScript to push JotForm submission events to dataLayer (e.g., jotform.on('submit') callback)
  4. Note: Checkout page tracking requires Shopify Plus; standard stores can’t modify checkout with custom scripts

Current Status:
The user shared their website (hybrisonline.com) and screenshots showing the pixel tests successfully in GTM, but form tracking remains non-functional. Discussion centers on correcting event naming conventions and proper dataLayer implementation for the JotForm.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi,

I am trying to add google tag manager to be able to track a form on the page. I cannot see the tag in tag assitant but read that is normal with shopify. However I can see on the analytics tag that it does not fire on any more pages than the first one. Have read a lot of questions that it does not work on checkout but anybody know how to get it to tag all pages?

Have added the tag with the custom pixel and added this code to get it on all pages but without any luck:

document.addEventListener(‘shopify:section:load’, function() {
window.dataLayer = window.dataLayer || ;
window.dataLayer.push({‘event’: ‘page_view’});
});

Anybody know how I can solve this? I want to be able to track a jotform to see where the submissons come from (google ads etc).

Thank you!

Sofia

This is a common challenge with GTM on Shopify, especially since Shopify’s checkout (and sometimes other dynamic pages) can be a bit tricky with custom scripts. Here are a few pointers to help you out:

  1. Ensure GTM Code is Everywhere:
    Make sure you’ve placed your GTM container snippet in your theme.liquid (typically in the and right after the opening tag) so it loads on every page. Sometimes people accidentally omit it on dynamic pages.

  2. Dynamic Page Loads:
    Shopify’s sections and dynamic page transitions can mean that a simple page load event isn’t enough. Your event listener for ‘shopify:section:load’ is a good start, but you might also want to add a DOMContentLoaded event as a fallback:

document.addEventListener(‘DOMContentLoaded’, function() {
window.dataLayer = window.dataLayer || ;
window.dataLayer.push({‘event’: ‘page_view’});
});
document.addEventListener(‘shopify:section:load’, function() {
window.dataLayer = window.dataLayer || ;
window.dataLayer.push({‘event’: ‘page_view’});
});

This can help ensure that a page view is recorded regardless of how the page is loaded.

  • Checkout Limitations:
    For non-Shopify Plus stores, the checkout pages are hosted on a Shopify subdomain and can’t be modified with custom scripts, so GTM won’t fire there. If your JotForm is on a regular page, then you’re good, but remember that the checkout is a known limitation.

  • Tracking the Form Submission:
    Since you’re trying to track a JotForm submission, see if JotForm provides an event callback or webhook that you can hook into. You can then push a specific event to the dataLayer when the form is submitted. For example:

// Assuming JotForm exposes an onSubmit event:
jotform.on(‘submit’, function() {
window.dataLayer.push({‘event’: ‘jotform_submit’});
});

This ensures you know exactly where your submissions are coming from.

In short, double-check that your GTM snippet is included sitewide, add multiple events for page views, and use specific event triggers for your JotForm. That should help cover all your bases!

Hope this helps, and feel free to share if you have any more questions.

Best,
Tracy from Kudosi Reviews

Hi sofia,

Thanks for your query.

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

you have to connect the GTM by placing the GTM script between the head section of the theme.liquid.

Once your website is connected to GTM now the game play.

to track the conversion event from jotform submission need a custom javascript code based on your form elements and structure. This code will be pushed a event in the GTM Datalayer when someone submits the form and reaches to thank you page successfully.

Once you have Datalayer event is there you can trigger the event and track for any platform like google ads or google analytics and so on.

Feel free to ask if you have any questions or assistance regarding GTM or Jotform tracking code.

Kind Regards

Hi,

Thank you.

I have installed the tag with the custom pixel:

// Step 1. Initialize the JavaScript pixel SDK (make sure to exclude HTML)

// Step 2. Subscribe to customer events with analytics.subscribe(), and
add tracking
// analytics.subscribe(“all_standard_events”, event => {
// console.log("Event data ", event?.data);
// });
(function(w,d,s,l,i){
w[l]=w[l]||;
w[l].push({‘gtm.start’: new Date().getTime(), event:‘gtm.js’});
var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),
dl=l!=‘dataLayer’?‘&l=’+l:‘’;
j.async=true;
j.src=‘https://www.googletagmanager.com/gtm.js?id=’ + i + dl;
f.parentNode.insertBefore(j,f);
})(window,document,‘script’,‘dataLayer’,‘GTM-T6C5JM8N’);

document.addEventListener(‘shopify:section:load’, function() {
window.dataLayer = window.dataLayer || ;
window.dataLayer.push({‘event’: ‘page_view’});
});

I could not first see the analytics either on all pages but now at least
that shows up. So I hope the GTM is also working. I cannot check it in
the tag assistant but read that it is like that for many shopify sites.
If I test the tag on other ways it does seem to work. It is a lot harder
to find the problem when I cannot use the tag assistant I think and see
that the tag fires or not and why.

So now my problem is that I cannot get the form to be tracked. We have
jotform on this site. I have tried adding the tag but I cannot even get
it to show in GA4. Not sure if you also can help with that or I have to
turn to jotform for that part?

Thank you!

Sofia Hjärtberg Zintio

IF you share your website link it would be easier to assess the condition.

custom pixel basically for thank you page and checkout page tracking. nevertheless if you can connect GTM by placing GTM code on custom pixel or in the theme.liquid file the form can be tracked anyway.

Kind Regards

Hi,

The page is: https://hybrisonline.com/

I did try to add the GTM with an app but then it did not get green when checking it in GTM.

In the tag assistant the GTM is not found. But I did read that happens a lot with shopify pages.

The pixel shows that it works when tested in GTM.

I tried to set up the listener now but still not working, as in I cannot see the submission in realt time GA4, since I cannot check with the tag assistant. So much harder to find what is working or not. But I can see that in your listener it says jot_from_submit and in mine jotformsubmissions. Will try to change that. I dont get anything up in my tag assistant so cannot see these codes.

Thank you!

Sofia