Check 44.18 · Redesign and migration

Check tracking

After a redesign, check tags, conversions, consent, Search Console and GA4 or Matomo settings on the new site, page by page and conversion by conversion.

Priority
Critical
Difficulty
Intermediate
Estimated time
2 h to 1 day
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 tracking after a redesign means making sure the new site's measurement works like the old site's: analytics tag present on every template, each conversion recorded once and only once, consent respected, Search Console and Bing Webmaster Tools properties verified for the new site. The check starts on staging and ends in the days following the switchover. The deliverable is a completed, dated acceptance checklist.

Why it matters

A redesign replaces the templates, and with them the tags written into the theme, the Google Tag Manager triggers that targeted old CSS classes, the forms and the checkout funnel. A domain change adds its own pitfalls: a Search Console verification file or tag that has disappeared, site URL settings in Matomo, a payment gateway that becomes the referrer for orders.

Without reliable measurement, there is no way to know whether the migration succeeded. A drop in traffic can come from lost rankings or from a tag missing on half the pages; a rise in conversions may just be a duplicate. For a site move, Google in fact advises analysing usage of the old and new sites with your analytics tool, and monitoring the Search Console reports.

What it improves

  • Diagnosing the migration The before and after curves are comparable, which lets you tell an SEO problem from a measurement problem.
  • Business management Forms, calls and sales stay attributed to their source, including traffic from AI assistants.
  • Compliance The consent banner actually blocks the tags that require consent.
  • Continuous Search Console data The new site's reports start from day one.

How to check

Quick check on one page:

  1. View the source code (Ctrl+U) and look for the ID of your GTM- container, your G- tag or matomo.js.
  2. In the developer tools, Network tab, filter on collect: a …/g/collect?…tid=G-… request is sent with every GA4 page view. For Matomo, filter on matomo.php.
  3. While you browse, your visit appears in the Google Analytics “Realtime” report, or in Matomo's Visitors > Visits Log.
  4. In Search Console, the new site's property shows you as a verified owner under Settings > Ownership verification.

The full check passes when every row of the checklist from step 1 is validated and the page view volume of the first few days is consistent with the old site's.

How to implement

Before you start

You need the baseline export of the old site, made before the redesign (see export Search Console and analytics data (opens in a new tab)), and Editor access to GA4 or administrator access to Matomo, plus access to Google Tag Manager and Search Console.

Do not mix test and production data: on staging, use a GTM container in a separate environment, a test property or stream, or a hostname filter. Otherwise, acceptance testing inflates the production figures.

Step 1 — Build the acceptance checklist

List everything the old site measured. Template to reproduce in a spreadsheet, with two example rows:

Item Tool Expected trigger Test page Staging Launch day D+7
Page view tag GA4 via GTM All pages One template of each type OK OK
Quote form submission GA4, generate_lead event, marked as a key event Confirmation message displayed /devis/ OK FAILED: counted twice
Phone click GA4, clic_telephone event tel: link Footer
Purchase GA4 purchase and Merchant Center Confirmation page Test order
Search Console verification Domain property (DNS) Not applicable Not applicable
Internal traffic exclusion GA4 filter Office IP address Not applicable

The guides track conversions, forms and quote requests (opens in a new tab), track phone and email clicks (opens in a new tab) and track purchases (opens in a new tab) describe how to configure each item.

Step 2 — Test on staging

  1. Open Tag Assistant, enter the staging URL and connect to the page: each tag that fires is shown, event by event.
  2. In GA4, open Admin > Data display > DebugView: events from your browser in debug mode arrive there within a few seconds, with their parameters.
  3. For Matomo, follow your visit in the Visits Log or in the real-time report.
  4. Work through each row of the checklist: form submission, click, add to cart, test order using the payment provider's test mode.
  5. Test consent: reject everything, reload, and check in the Network tab that no request requiring consent is sent; accept, and check that they are sent. See handle applicable consent requirements (opens in a new tab).

Warning: GTM triggers based on a CSS selector (.btn-devis), an element ID or button text are the ones that most often break during a redesign. Prefer triggers on events pushed to the data layer (dataLayer) by the site's code.

Step 3 — Check that tags are present on every template

On launch day, test one URL of each template (homepage, category, product page, article, contact page, cart, confirmation) and, if possible, every URL in the sitemap. This script checks that each ID is present in the served HTML:

#!/usr/bin/env bash
# Usage: ./controler-balises.sh urls.txt GTM-XXXXXXX G-XXXXXXXXXX > balises.csv
set -u

fichier="$1"
shift

echo "url,code,$(IFS=,; echo "$*")"

while read -r url; do
    url="${url%$'\r'}"

    if [ -z "$url" ]; then
        continue
    fi

    reponse=$(curl -s -L -A "Mozilla/5.0" --max-time 30 -w $'\n%{http_code}' "$url")
    code="${reponse##*$'\n'}"
    ligne="$url,$code"

    for identifiant in "$@"; do
        if grep -q -- "$identifiant" <<< "$reponse"; then
            ligne="$ligne,present"
        else
            ligne="$ligne,ABSENT"
        fi
    done

    echo "$ligne"
done < "$fichier"

Look for the ID that actually appears in the HTML: if GA4 is loaded through Google Tag Manager, only GTM-… appears there. The script does not see tags injected afterwards by JavaScript; for those, Tag Assistant remains the reference. With a paid Screaming Frog licence, custom search (Configuration > Custom > Search) does the same check during a full crawl.

Step 4 — Check the property settings

Same domain, new site: keep the same GA4 property and the same Matomo site, to preserve history and compare before and after. Check that the IDs have not changed in the new theme.

Domain change:

  • GA4: a web stream can measure several domains; keep the property for continuity. In Admin > Data collection and modification > Data streams, web stream, Configure tag settings, update the domain configuration for cross-domain tracking if you have it (see set up cross-domain tracking if needed (opens in a new tab)) and the list of unwanted referrals, for example the payment gateway. Update the internal traffic filter if the IP addresses have changed.
  • Matomo: Administration > Websites > Manage, edit the site and add the new domain to the site URLs. If the option that limits tracking to the listed URLs is ticked, visits to the new domain are ignored until it is listed.
  • Google Ads, Merchant Center, Google Business Profile: update the website URL, the final URLs and the product feed. See also identify revenue-generating pages (opens in a new tab).

Record the date and time of the switchover in your migration log (and as an annotation in the analytics tool if it offers one): it is the reference point for every comparison.

Step 5 — Search Console and Bing Webmaster Tools

  • Same domain: the existing property carries on. If it was verified with an HTML file or a meta tag, check that they still exist on the new site; without them, verification is eventually lost. DNS verification of a domain property (opens in a new tab) does not have this problem.
  • New domain: create and verify the new domain's property before the switchover, with the same Google account as the old one, and keep the old one verified: it is essential for tracking the deindexing of the old URLs and for the Change of Address tool (opens in a new tab).
  • Bing Webmaster Tools: add the new site, or import it from Search Console. See set up Bing Webmaster Tools (opens in a new tab).

Step 6 — Monitor the first few days

When Check Warning sign
Launch day, within the hour Realtime, one test conversion of each type No visits, or conversion missing
D+1 Page views per template compared with the same weekday the week before Template at zero, sharp drop on one page type
D+2 to D+3 Key events per day, conversion rate Conversions doubled or halved
D+7 Traffic sources, including traffic from AI assistants Rise in “direct” traffic or in a payment referrer

Google states that data in GA4's standard reports usually arrives within a few hours, but that processing can take 24 to 48 hours: judge the first few hours with Realtime and DebugView. For traffic coming from AI assistants, see identify ChatGPT, Perplexity, Gemini, Copilot and Claude referrers (opens in a new tab).

Google Tag Manager checkpoints

  • The container must be published: a change that is saved but not published works in Preview mode and not for visitors. Check the live version in the Versions tab.
  • If you use GTM environments, the staging snippet contains gtm_auth and gtm_preview parameters. Copied to production, it loads the test version: compare the production snippet with the one for the “Live” environment.
  • Review every URL-based trigger (Page Path contains /merci): paths have often changed.

WordPress

Versions WordPress 6.4 and later; Site Kit by Google, GTM4WP and Matomo Analytics, November 2026 versions.

If the tag is inserted by a plugin (Site Kit by Google, GTM4WP, Matomo plugin), check that it is activated and configured on the production site: the configuration is stored in the database and may have been overwritten during the import. If it was hard-coded in the old theme (header.php), the new theme does not have it. Do not stack two methods: a plugin plus code in the theme counts every page view twice.

Shopify

Versions Shopify admin, all plans, November 2026.

GA4 goes through the Google & YouTube app, other tools through Settings > Customer events. After a theme change, remove any GA4 tag added by hand in theme.liquid, which would double page views. Purchase tracking only works once the store is no longer password-protected: place a real test order, refunded afterwards, on launch day.

Laravel

Versions Laravel 11 to 13.

Put the tag in the shared Blade layout and load it according to the environment, with the ID in the configuration:

// config/services.php
'google_tag_manager' => [
    'id' => env('GOOGLE_TAG_MANAGER_ID'),
],
@if(app()->isProduction() && config('services.google_tag_manager.id'))
    <script>(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','{{ config('services.google_tag_manager.id') }}');</script>
@endif

Check that GOOGLE_TAG_MANAGER_ID is set in the production .env, then run php artisan config:cache.

Next.js

Versions Next.js 15 and 16 (App Router).

Load the container once, in the root layout, with @next/third-parties (a package described as experimental in its documentation):

// app/layout.tsx
import { GoogleTagManager } from '@next/third-parties/google';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="fr">
      <GoogleTagManager gtmId={process.env.NEXT_PUBLIC_GTM_ID ?? ''} />
      <body>{children}</body>
    </html>
  );
}

Client-side navigations do not reload the page: check in DebugView that a page view is recorded on every route change, thanks to the enhanced measurement option for browser history events or to a “History Change” trigger in GTM.

Common mistakes

  • Testing only the homepage: secondary templates (order confirmation, error pages, landing pages) often lose the tag.
  • Acceptance testing with production data: staging tests inflate conversions. Use a test stream or a hostname filter.
  • Triggers on CSS selectors: they break as soon as the new theme renames a class.
  • Duplicate tags: a plugin plus hard-coded code, or a GA4 tag in the theme plus the Shopify app. Page views double and the bounce rate collapses.
  • Losing Search Console verification: the google….html file or the meta tag no longer exists on the new site.
  • Forgetting the payment gateway: without excluding unwanted referrals, sales are attributed to the payment provider instead of the real source.

Frequently asked questions

Should you create a new GA4 property after a redesign or a domain change?

No, in most cases keep the same GA4 property. A web stream can measure the new domain, and keeping the property preserves history, audiences and key events, which lets you compare before and after the migration directly. A new property is only justified if the nature of the site changes, or if the old configuration is too degraded to be fixed.

Do you need a new Search Console property after a domain change?

Yes, the new domain needs its own Search Console property, verified before the switchover with the same Google account as the old one. Also keep the old property verified: it lets you track the deindexing of the old URLs and it is essential for the Change of Address tool. A domain property verified via DNS covers all subdomains and protocols.

How do you test tracking on a staging site without polluting your statistics?

Send staging data somewhere other than the production property: a test property or stream, a dedicated Google Tag Manager environment, or a data filter on the hostname. Then test with Tag Assistant, GTM's Preview mode and GA4's DebugView, which show each event live without waiting for the standard reports.

Why did traffic drop in GA4 right after launch?

Before concluding that rankings were lost, check the measurement. The most common causes are a tag missing on some templates, an unpublished Google Tag Manager container, a consent banner that blocks everything, or a domain filter in Matomo. Then compare with Search Console clicks, which do not depend on the tag: if they are stable, the problem comes from tracking.

Updated on

Topic checklist (PDF)

And now?

In the “Redesign and migration” topic

  1. Crawl the site before the redesign
  2. Export URLs and metadata
  3. Export Search Console and analytics data
  4. Export backlinks
  5. Identify revenue-generating pages
  6. Identify pages cited by AI systems
  7. Identify strategic pages to preserve
  8. Keep high-performing URLs if possible
  9. Create a comprehensive redirect map
  10. Map old URLs to relevant equivalents
  11. Preserve strategic content and internal links
  12. Preserve structured data, entity identifiers and important anchors
  13. Protect and audit the staging site
  14. Test performance before launch
  15. Test redirects
  16. Check canonicals, hreflang, sitemaps and robots.txt
  17. Remove indexing blocks on the live site
  18. Check tracking
  19. Submit new sitemaps
  20. Use Google's Change of Address tool if applicable
  21. Crawl the site after launch
  22. Monitor critical errors daily
  23. Monitor rankings, traffic and AI citations
  24. Keep redirects for at least a year, ideally longer
  25. Prepare a rollback plan