Fix Pageview collection errors on GA

Business benefits

Contributors: @fred.pike @chad_wyatt @leandro_griboff

Improve accuracy of data and analytics.

Use Google Tag Manager to pick up errors with your Google tags or analytics tracking code.

You can use the Google Tag Assistant Chrome extension to see if your Google Analytics tracking code is firing correctly.

How to use Google Tag Assistant
  1. Install the Google Tag Assistant Chrome extension.
  2. Open your website and see whether your Google Analytics tag fires correctly.
  3. Click Record to record your activity on your website.
  4. Begin navigating and opening new pages on your site.
  5. Click Stop when you are finished testing.
  6. Analyze the report to identify where issues might occur.

You might also notice manually that an issue with page views is present. If data does not match, for example, GSC shows 50 clicks and GA shows 10 page views, there could be an issue with page view data showing correctly.

Check Google Tag Manager and ensure Triggers are set up correctly.

Errors and conflictions in triggers can result in inaccuracies in data or no data at all. You can assess triggers with some troubleshooting steps.

  1. Test triggers in preview mode. Conflicts within your sites code can cause tags to misfire or not fire at all. You can use preview mode to test if tags are firing correctly and data is being received.
  2. Check filters to ensure triggers will only fire when your specific conditions are met, such as page views.
  3. Test older web browsers: These can cause issues with tag behavior.

Ensure Tags are firing for PageView and only Once Per Event.

Check your tags are set up to fire for PageView events and that the settings are configured for only Once Per Event.

If you don’t have a tag for Page Views, you can create one. To create a new page view trigger:

  1. Click Triggers > New.
  2. Click Trigger Configuration then choose a page view trigger type.
  3. Specify conditions for pages where you expect a click to occur:
  • On “This trigger fires on”, choose “Some Events”.
  • On “Fire this trigger when an Event occurs and all of these conditions are true”, add a filter to enable this trigger on pages that require it.
  1. Save the trigger and publish.

Check Google Analytics tracking code is correct, up to date, and implemented correctly.

Look at the code on your website and the code in your GA property to make sure they match. If multiple users have access to the site, new codes or properties could have been generated by mistake.

To find your property and code: (insert instructions and image)

Check your Google Analytics tracking code is implemented correctly and it is present on every page of the website where you want to collect data. You can use tools such as Screaming Frog, Google Analytics Debugger, and GA Checker.

When adding the Global Site Tag to your site, make sure you copy from the Analytics dashboard to retain the correct format and no errors in formating occur.

(Image)

Double check you have no typos or errors in your tracking code syntax. For example, an extra space or character in your tracking code. Be aware that function names are case sensitive and true or false values should not be enclosed in quotes.

Check you’ve installed your Google Analytics tracking code in the right place on your website. This should be between the. </head> tag. If it’s installed in another place, it can take longer for the script to load and events might not be captured.

If you run multiple sites, check the property code is attached to the correct site.

Make sure the Google Analytics ID installed on your website correlates with the ID you see in your Google Analytics property settings.

Check Developer tools for JavaScript errors by selecting More Tools > Developer Tools from your main menu on Chrome or Right-Click the page and select Inspect.

You can use Developer Tools to tell you if there are any JavaScript errors and make sure that all requests are successfully completed.

If you use Chrome, you can do the following:

  • Select More Tools > Developer Tools from the main menu
  • Press Cmd + Opt + I or Control + Shift + I.
  • Right-click a page element and select Inspect]

The inspection tool will highlight any JavaScript errors.

Check Developer tools for Network Request issues by selecting More Tools > Developer Tools from your main menu on Chrome or Right-Click the page and select Inspect.

Under the Network tab, you can specify requests using the filter feature. Type in “collect” to see all hits sent to the Google Analytics endpoint. Requests that have been successfully sent with have a response code 200. You can then refresh pages to check the status code for each one. If there are requests, the tracking code is likely incorrect.

(IMAGE)

Check ‘Filters’ that you have set up in Google Analytics for conflicts affecting data collection.

A filter can cause your data to be unwillingly filtered from reports. This can happen more frequently when using multiple filters. In Google Analytics, the order and type of filters are important. For example, you can’t include two “Include” filters of the same type.

Remove duplicate codes if you have both JS and tracking code in your code.

This could also be a result of using WordPress plugins or external tools to add code, plus manually adding it. Duplicate codes can cause conflicts and cause data errors.

Check you haven’t turned on your User-ID and haven’t set it up correctly.

Google Analytics User ID actually requires additional code in order for it to function properly. If the User-ID is enabled but not properly configured, your Google Analytics account will contain no data.

ADD IMAGE

Last edited by @hesh_fekry 2023-11-14T18:04:03Z

2 Likes

How is this output looking from this question?

@BrunoLuiAguiar @leandro_griboff @fred.pike

Thanks @chad_wyatt for condesing.

Cc @tania

1 Like

It seems good to me, at first sight.

Can’t wait to test it on my next audit! :grin:

Thanks Guys!

3 Likes