Check 41.06 · Tracking and analytics setup

Check data collection

Check that GA4, Matomo or Tag Manager collect data on every page, only once and in line with consent, using a reusable test plan.

Priority
Critical
Difficulty
Intermediate
Estimated time
1 to 2 h, then 15 min after each deployment
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

Checking data collection means proving that the analytics tool receives what it should: one page view per page displayed, on every template, with no duplicates, with the right traffic source, and only when the visitor has agreed to it. The task produces a completed test plan, to be run again after each release. Once this is done, you know which figures to trust and which are skewed.

Why it matters

A tag can be “installed” without working correctly. The common cases:

  • a template (product pages, blog posts, checkout) did not receive the code;
  • the tag is loaded twice, by a plugin and by Tag Manager;
  • a consent banner blocks everything, even after acceptance;
  • the return from a payment page replaces the original source with paypal.com;
  • a redesign removed the code without anyone noticing.

These failures trigger no alert. They show up weeks later, when a curve drops or a conversion rate becomes inconsistent, and the period concerned is lost: an analytics tool never collects retroactively.

It is also the prerequisite for any measurement of traffic from generative engines. A visit from ChatGPT or Perplexity that is wrongly attributed ends up in “Direct” or “Unassigned”, and the AI channel looks smaller than it is.

What it improves

  • Reliable figures Page views, sessions and conversions counted once and in the right place.
  • Attribution Traffic sources preserved up to the conversion, including AI referrers.
  • Compliance Proof that no data is sent before consent when consent is required.
  • Responsiveness A failure detected on the day of the deployment rather than at the monthly review.
  • Rankings No effect.

How to check

The minimal test, in five minutes, with the browser's developer tools (F12) in a private window:

  1. Network tab, filter collect (GA4) or matomo.php (Matomo).
  2. Load the home page: before any choice in the banner, no measurement request with cookies should be sent if consent is required.
  3. Accept: one page view request is sent, only one. For GA4, the URL contains tid=G-… and en=page_view.
  4. Open a product page or an article, then a checkout page: one request per page.
  5. In GA4, Realtime report: your visit appears in the last 30 minutes.

If any of these steps fails, follow the full method below.

How to implement

Step 1 — List what must be collected

Before testing, write down the target: which templates, which events, which conversions. Example for a services site with a quote form:

Item Templates or trigger Tool Expected name
Page view All public pages GA4 page_view
Scrolling, outbound clicks Enhanced measurement GA4 scroll, click
Quote form submission Confirmation page /merci-devis/ GA4 and GTM generate_lead
Click on the phone number tel: links GTM click_phone
Purchase Order confirmation page GA4 purchase

Step 2 — Check presence on every template

A manual check on three pages is not enough: the forgotten template is often the problem.

  • With Screaming Frog: Configuration > Custom > Custom Search, search for the ID (G-XXXXXXXXXX, GTM-XXXXXXX or matomo.js). After the crawl, the Custom tab lists the URLs that do not contain it, and those that contain it several times. The free version is enough for up to 500 URLs.
  • Without a tool: open one URL of each template (home, category, product, article, contact, cart, confirmation, 404) and search for the ID in the source code (Ctrl+U). If the tag is injected by Tag Manager, search for GTM-.

Compliant: each public page contains the ID once, and staging does not contain it, or contains a separate one.

Step 3 — Check with Tag Assistant

Tag Assistant works for the Google tag as well as for Tag Manager:

  1. “Add domain”, enter the site URL, then “Connect”. The site opens in a tab linked to Tag Assistant.
  2. Browse the pages and perform the actions to measure (form submission, click on the phone number).
  3. In Tag Assistant, each page lists the tags and events. For Tag Manager, each event's tab shows the tags that fired and those that did not, with the trigger responsible.

Warning signs: two Google tags with the same ID, duplicate page_view events, a tag that fires on an unexpected event.

On Shopify, Tag Assistant does not work with custom pixels: use the Shopify Pixel Helper extension.

Step 4 — Check reception in the tool

GA4

  • Reports > Realtime: activity over the last 30 minutes, all visitors combined.
  • Admin > Data display > DebugView: your own events, one by one, with their parameters. Debug mode turns on automatically with Tag Assistant or Tag Manager preview, or by adding debug_mode: true to the tag configuration.
  • Standard reports and explorations can take 24 to 48 hours to fill: do not conclude there is a failure on the same day.

Matomo

  • Visitors > Visits Log: each visit appears with its pages, source and actions within a few seconds. Spot yours by the time or the device.
  • With Matomo Tag Manager, the preview and debug mode shows the tags fired, like Google's.
  • If aggregated reports stay empty while the log fills up, check that report archiving (the core:archive scheduled task) runs on the server.

Run three journeys in a private window, with the developer tools open on the Network tab and the Application tab (cookies):

Journey Expected with GA4 and advanced Consent Mode Expected with full blocking (basic mode, Matomo with consent)
No choice No _ga cookie; cookieless requests possible No measurement request
Refusal No _ga cookie; cookieless requests possible No measurement request
Acceptance _ga cookie set; subsequent requests are sent with the cookie Page view sent immediately, without reloading; cookie set

A common mistake revealed here, with full blocking: the page view is only sent on the next page after acceptance, and the landing page, and therefore the source of the visit, is lost. Configuration details are in handle applicable consent requirements (opens in a new tab); the effect on performance is covered in test before and after cookie consent (opens in a new tab).

Step 6 — Check attribution

Arrive on the site from each type of source, then check in Realtime or in the visits log:

  • Organic search: search for the brand on Google and Bing and click the result. Expected source: google or bing, medium organic.
  • AI assistant: ask ChatGPT or Perplexity a question that cites your site and click the source. Expected source: the assistant's domain, for example chatgpt.com or perplexity.ai. See identify ChatGPT, Perplexity, Gemini, Copilot and Claude referrers (opens in a new tab).
  • Payment: place a test order with a return from the bank or PayPal. The conversion must remain attributed to the arrival source. Otherwise, declare these domains as unwanted referrals in GA4 (Configure tag settings) or exclude them in Matomo.
  • Internal links: no internal link should carry utm_ parameters, which would overwrite the real source mid-visit. See use available UTM parameters (opens in a new tab).

In the reports, a large share of “(not set)” landing pages or “Unassigned” traffic indicates a missing page view or incomplete channel settings.

Step 7 — Cross-check with Search Console

Over four weeks, compare Google clicks in Search Console with sessions from Google organic in the analytics tool. The two figures will never be equal: refused consent, blockers, different definitions of a click and a session. What matters is how the gap evolves. If it suddenly widens on a specific date, look for what was deployed that day.

Step 8 — Keep the test plan

Deliverable: a shared table, run again after each release that touches the templates, the banner or Tag Manager. Completed example (fictitious values):

Check Where Expected Result Date Tester
Tag on every template Screaming Frog crawl, search for GTM- 0 URLs without the tag 3 /blog/tag/… URLs without the tag 2026-11-20 Léa
A single page view per page Tag Assistant, 5 templates 1 page_view per page Compliant 2026-11-20 Léa
No cookie before choice Application tab, private window No _ga Compliant 2026-11-20 Marc
Landing page kept after acceptance DebugView page_view of the landing page Compliant 2026-11-20 Marc
Lead attributed to the source Realtime, visit from Bing bing / organic Compliant 2026-11-20 Léa
Return from payment Test order Original source kept paypal.com / referral: to fix 2026-11-20 Paul

To automate some of these checks, see create alerts for traffic and conversion drops (opens in a new tab).

Tip: record each release in an annotation or a shared log. When a curve breaks, the first question is always “what changed that day?”.

Common mistakes

  • Testing while logged in to the CMS admin: many plugins turn off measurement for administrators, and you wrongly conclude there is a failure.
  • Testing with an ad blocker turned on: the tag is blocked by the browser, not by the site.
  • Concluding there is a failure on the same day: GA4's standard reports can take up to 48 hours to fill. Use Realtime and DebugView.
  • Testing only the home page: the forgotten template is almost always elsewhere.
  • Forgetting the checkout and the confirmation pages, where conversions happen.
  • Leaving debug_mode in production: remove the parameter after testing; setting it to false does not turn it off.
  • Never running the test plan again after a redesign or a theme or banner change.

Frequently asked questions

Why does GA4 show fewer visits than Search Console shows clicks?

Search Console clicks and GA4 sessions do not measure the same thing. GA4 counts only visitors whose browser runs the tag: consent refusals, ad blockers and people leaving before the page loads lower the total. A stable gap is normal. A gap that suddenly widens on a specific date, however, signals a collection failure to fix.

How can I tell whether the GA4 tag is installed twice?

Open Tag Assistant or the Network tab of the developer tools and load a page: two page_view requests to google-analytics for the same page, or two tags with the same G- ID, indicate a duplicate. The usual cause is a tag added both by a CMS plugin and by Google Tag Manager. Keep a single installation source.

How long does it take to see data in GA4?

GA4's Realtime and DebugView reports show events within seconds, which is enough to check an installation. Standard reports and explorations, on the other hand, can take 24 to 48 hours to fill. So do not conclude there is a failure because a report is still empty on the day of installation: check the Realtime report first.

Should these checks be repeated after every site update?

Yes, at least for releases that touch the templates, the theme, the consent banner or Google Tag Manager. These changes are the leading cause of broken collection, and no alert warns you: the failure is discovered weeks later. A short test plan, run in fifteen minutes, keeps you from permanently losing periods of data.

Updated on

Topic checklist (PDF)

And now?

In the “Tracking and analytics setup” topic

  1. Set up Google Search Console
  2. Verify the domain property via DNS
  3. Set up Bing Webmaster Tools
  4. Set up GA4, Matomo or an equivalent
  5. Set up Google Tag Manager if needed
  6. Check data collection
  7. Handle applicable consent requirements
  8. Track conversions, forms and quote requests
  9. Track phone and email clicks
  10. Track downloads and sign-ups
  11. Track purchases
  12. Set up cross-domain tracking if needed
  13. Fix duplicate conversions
  14. Exclude internal traffic if relevant
  15. Identify organic and AI landing pages
  16. Create a dedicated channel for AI traffic
  17. Identify ChatGPT, Perplexity, Gemini, Copilot and Claude referrers
  18. Use available UTM parameters
  19. Connect analytics to the CRM if relevant
  20. Measure lead quality and revenue
  21. Document the limits of attribution
  22. Set up Consent Mode v2 if you use Google tags