Google Tag Manager sends page_view events with uniqueEventId 0 - google-tag-manager

I'm embedding GTM in a Nextjs based site. The problem is Page View trigger does not seem to work on page navigation. Inspecting GTM events in debug view, I found that page_view events were recorded, but all with uniqueEventId 0.
Besides, logging dataLayer object out in browser console showing no such page_view event. What would be the possible cause of this uniqueEventId 0 for page view

Related

how can I validate if good analytics is counting review with ajax request

I have installed the google analytics in our e-commerce site using google tag manager. From the product detail page you can click on the colors to see the same product in the different colors. I implemented this using ajax so the page load is not required. I was curious if the google analytics will count as multiple reviews a user clicks on the different colors or do I need to explicitly call something in order for the GA to count as multiple reviews.
First of all, that depends how and what kind of GA you've implemented.
To implement analytics, you have to specify a trigger for the analytics tag. That trigger normally determines if a tag is fired or not.
If you used a page load trigger, then the tag will only be triggered on the real page load. And it won't be triggered on your ajax manipulations.
With only one exception: if you used the GA4 config tag, you had this checkbox there:
The checkbox doesn't only send the pageview on config load, it keeps sending pageviews on every history change. Therefore, if your ajax causes history change and you use the GA4 config tag, then you're getting pageviews.
But this is theory. You can just go and check. Open your network tab, filter the request by collect and see what's sent when. Or alternatively, install the adswerve datalayer debugger and it will log whatever is sent whenever it's sent into the console in a very neat, clean way. This is how it works on this page:

Bad Event Tracking Code - Google Analytics

have you had this problem with GA?
The Landing Pages report has a (not set) entry.
A pageview hit must precede event hits in order for the event hits to include the page that they fire from. When event hits aren't preceded by a pageview, Google Analytics doesn't have the page for the event hits, so their page is (not set).
Verify that tracking code for property SITE sends a pageview hit before sending any events.
Google Tag Assistant Recordings can help you verify that your hits are sent in the correct order.
Any suggestions would be great please. Thanks

Google Analytics Hit not sent

I have a GA pageview tag firing through GTM with an all pages trigger. GTM is confirmed on page and actively working, and the tag is firing on all pages and hits are being sent to GA.
All except one page, where the GTM tag fires, but not GA hit is being sent.
Debugging within console, filtering for collect hits.
I've never seen a case where the GTM preview is showing the tag firing, but the browser network hits are not being sent.
Stranger still the other tags, i.e Facebook also in GTM, are being sent.
I'd like to know some points I can take to the web devs to help them debug this as it doesn't appear to be an issue with GTM or the tag.
Any ideas appreciated!
Thanks

why isn't this google analytics event being logged?

I've created a new Google Analytics website. I've added the tracking code script block before . I'm sending a custom event to GA and no js error is thrown. However, when I navigate to Reporting > Behavior > Events > Overview, no events are displayed. I haven't created any filters for this GA account that would block the request. Any idea what the problem might be or next steps to debug?

Sudden increase in direct (not set) traffic after implementing Google Tag Manager

After I installed Google Tag Manager, there has been a big increase in direct traffic with "(not set)" landing page. When I look at the events, they're all now coming from (not set) landing page.
So it looks like events are firing, but _trackpageview is not. However, I have bot Page View and Events in GTM Firing on "all pages". There are not view filters on the page, so this is not the case either. And when I use GTM's debug functionality, all tags seem to be firing correctly. This has been an issue for a couple of weeks now, ever since I implemented GTM.

Resources