GA4 shows a strong month for your paid search campaign: plenty of sessions, plenty of form submissions. Your CRM shows the same month’s leads, and most of them say “Website”, “Direct” or “Online inquiry”. The campaign was there when the visitor landed. Somewhere between the landing page and the CRM record, it disappeared.
The problem: GTM sees the campaign, your CRM doesn’t
Google Tag Manager (GTM) is a free tag management system: it manages the JavaScript tags that websites use for analytics, advertising and tracking, such as the GA4 tag, conversion tags and pixels, without editing site code for every change. GTM reads from a structure called the data layer, and it is very good at telling your analytics and ad platforms what happened on a page. It was never designed to make sure your forms and CRM know where the visitor came from. That gap is where most long-funnel attribution goes dark.
What is the data layer in GTM?
The data layer is a JavaScript array, window.dataLayer, that holds key-value pairs your website hands to Google Tag Manager. It can contain information about the page (its type, program or product), the visitor (new or returning, logged in or not) and what they did (submitted a form, started a chat, clicked a phone number). GTM reads those values and passes them to tags and to tools such as GA4 and Google Ads.
Values go in with the push() method. A program page might push window.dataLayer.push({'pageType': 'program', 'program': 'nursing-bsn'}); as it loads, high in the page code and above the GTM container snippet, so the values are there when the first tags fire. Create the array with window.dataLayer = window.dataLayer || []; rather than reassigning it, so you never overwrite the array GTM is already listening to.
The data layer also carries events: a push such as window.dataLayer.push({'event': 'inquiry_submit', 'program': 'nursing-bsn'}); when a form is submitted lets a Custom Event trigger in GTM fire a GA4 event or a conversion tag. Events are how GTM knows something happened, not just what page someone is on.
Treat the data layer as a structured description of what matters to the business, translated into code. Keep variable names generic, consistent and future-proof, because the same data layer will feed GA4, the ad platforms and whatever tools come next.
Why it happens: the data layer forgets on every page
Here is the detail that causes the trouble: the data layer only lives as long as the page. When the visitor clicks to the next page, it starts empty again. Google’s own documentation says that values relevant across pages must be pushed again on every page.
Now follow a real prospect. Example: higher education. She clicks a paid search ad for a nursing program and lands on a page whose URL carries the campaign, keyword and click ID. GTM sees all of it and tells GA4. She reads two more pages and leaves. Four days later she comes back on her phone by typing the college’s name, browses, and submits the inquiry form on a different page. By then the landing page’s data layer is long gone. Unless something saved the source at the first touch and carried it to the form, the form submits with nothing, and the CRM fills the gap with “Website”.
That is the blind spot: touchpoints captured by the analytics tags but never written to the lead. GA4 keeps its own picture of the session; the ad platform keeps its own click. Neither one is in the CRM record that everyone uses to decide where the budget goes. And the click ID (gclid, fbclid), the one value that lets you later send the outcome back to the ad platform, is lost along with it.
The blind spot
It also breaks silently. A site redesign drops the GTM container from one template. A new landing page builder doesn’t push the data layer. A form plugin update renames the hidden fields. Nothing errors; the leads just stop carrying a source, and nobody notices until the numbers look wrong months later.
What it costs
- Your best campaigns look like “Direct”. The campaigns that start long journeys lose credit to whatever the CRM records at the end.
- GA4 and the CRM never agree. Two sets of numbers for the same month, and a meeting spent arguing about which is right.
- No offline conversions. Without the click ID on the lead, enrolled students, move-ins and funded loans can’t be sent back to Google or Meta, so the platforms keep bidding for form fills.
- Breaks become permanent history. Weeks of leads without a source can’t be recovered later; the gap stays in your trend line.
How to fix it: instrument the handoff, not just the page
Capture the source at the first touch and keep it. On landing, store the full source (UTM parameters, click IDs, referrer, landing page) in a first-party cookie or local storage, so it survives page changes and return visits. Don’t overwrite it with “Direct” when the visitor comes back.
Write it into every form, chat and phone call. Populate hidden form fields from the stored values on every form, on every page, and map those fields all the way into the CRM. Do the same for chat and for phone calls, using dynamic number insertion so each call is tied to the ad and visit that produced it. Capturing every source, system and handoff is what attribution tracking means in practice.
Govern the data layer. Write a short governance document: who owns the data layer for the business and technically, which variables exist and what they mean, and how changes get made. A data layer nobody owns drifts with every redesign.
Observe it continuously. Every new page, form, campaign and plugin update is a chance to break capture. Check that the container is on every page, that every form carries the source and that click IDs reach the CRM, all the time, not once a year, so a break is caught the day it happens. For sending server-side events when the browser can’t, see Measurement Protocol 101.
Checklist: test your GTM data layer
- Is the GTM container, and your data layer push, on every page, including landing pages, microsites and third-party application pages?
- Run a test journey: click your own ad, leave, come back days later on another device, and inquire. What source does the CRM record show?
- Does every form carry the full source in hidden fields (campaign, keyword, click ID), or only the channel?
- Are gclid and fbclid stored with the lead all the way into the CRM?
- Is every phone call tied to the ad and visit that produced it?
- Who owns the data layer, and is there a written list of its variables?
- When the site or a form last changed, did anyone check that the source still reaches the CRM?
