5

I have installed a google tag manager and that is sending all event to Google Analytics. Checked in Tag manager preview the event is triggering fine and data is going to Google Analytics. But the actual count and Google Analytics count differs a lot. For example I have a page In which the event is triggering fine and added a local storage it will increase the count whenever the event is triggered in my browser I have visited the page 50 times and the local storage count is 50 but the Google Analytics count after a interval of 24 hours shows only 8 in GA. Don't know what went wrong.

  • Have a cookie consent banner
  • using GoogleTagManager '@next/third-parties/google'
  • Gtag js is loading fine Tag look like this
 <GoogleTagManager gtmId={process.env.NEXT_PUBLIC_GTM ?? ''} />
  • And the checked the nginx.access.log for that particular page it also have the same count

Am I missing something in here?

1 Answer 1

1

It can happen for multiple reasons.

  1. Google Analytics applies sampling and thresholds, especially for free accounts, when traffic exceeds a certain limit.
  2. Real-time events in GA may show immediately, but the full count of processed data may take time to appear. Sometimes there’s a 24-48 hour lag in GA processing. Wait for 48 hours and recheck the data in GA.
  3. If you have a Cookie consent banner and users do not accept cookies, the GTM container may not fire the event properly. Check whether your event rely on tracking cookies, if so, ensuree consent is granted before the GTM tag fires..
  4. If you have filters (like excluding internal traffic or specific IPs) configured in GA, it could result in lower counts.
  5. The configuration of your event tags might cause issues with duplicate prevention or sending failures. Ensure your tags are correctly set to fire on intended triggers. Verify the event name, parameters and firing conditions in GTM match what you expect.
  6. GTM might have additional conditions preventing repeated triggers. Ensure the tag has no "once per page" or similar settings restricting events.
  7. Also check your browsers for Ad blockers, browser privacy settings, or JavaScript errors which can prevent tags from firing.
2
  • Yeah probably thinking the data sampling causes the issue and we went with our server side tracking Commented Dec 19, 2024 at 6:31
  • 1
    Server-side tracking is a great approach to bypass sampling and other limitations of client-side tracking! It provides more accurate data and works even in scenarios where ad blockers or cookie consent banners might block tags. Just make sure to double-check your server-side implementation for data accuracy and compliance with privacy regulations. Commented Dec 19, 2024 at 8:22