Question from user:
Hi everyone!
I’m having trouble tracking conversions on our website, we have a form that redirects to a thank you page, and I’ve set up conversion tracking with GTM, and so far it’s tracking the correct number of form submissions via the thank you page, however, I’ve noticed that is not tracking the correct source even though we are using UTMs.
In the past three months I’ve noticed that it only recorded two of 20+ submissions with the correct source, however, on the backend of our website, the form submissions save the URL or origin, which has the UTM codes and they don’t match the records on GA4, which shows that most conversions came from ‘
direct/none
’.Any insights to solve this are greatly appreciated!
Answer from Nabil:
The short answer is:
The discrepancy between your backend form submissions that have the correct UTMs and the Google Analytics 4 (GA4) attribution showing direct/none
for conversions is a very common issue almost always caused by the form submission process itself.
When a user submits a form and is immediately redirected to a separate thank you page, this server-side redirect often strips the original URL parameters, including the UTM codes, from the URL before the GA4 tracking code on the thank you page has a chance to read them.
GA4 then sees the thank you page loading without any source information and, by default, assigns the conversion to the current session’s source, which is frequently direct/none
because the referral source was lost in the redirect.
You are correct that your GTM setup is accurately tracking the conversion event itself, but the attribution data (source/medium) is being lost during the critical moment of the redirect.
The long answer is:
The reason your conversion event is firing correctly on the thank you page, but the attribution is lost, is due to the fundamental nature of how a form redirect interacts with client-side tracking like GA4.
When a user lands on your form page via a URL with UTMs, the GA4 script registers the correct source/medium.
However, when the user clicks submit and the server performs a 301 or 302 redirect to the thank you page, that fast redirect often fails to pass the original UTM parameters to the new URL, and it also clears the referrer information that GA4 relies on for attribution.
When the GA4 script loads on the thank you page, it has no record of the initial campaign or source, so it defaults to the lowest-priority channel, which is direct/none
.
The fact that your backend is saving the correct original URL with UTMs proves that the tracking information exists, but it’s being lost in the client-side browser environment before GA4 can process the conversion.
To fix this immediately, the best client-side method is to modify your GTM setup to capture the UTM parameters from the landing page URL and store them in a cookie or the browser’s local storage.
Then, when the conversion event fires on the thank you page, you pass those stored values as event parameters (like traffic_source
, traffic_medium
, etc.) with your conversion event, which will override the lost attribution data.
Alternatively, you could try changing the form submission to use an AJAX submission (without a full page redirect) and then firing the conversion event via a dataLayer.push
instead of relying on the thank you page load.
However, the most robust, long-term solution that eliminates these client-side failures is to move to a server-side tagging architecture combined with API data integration.
This would involve using Google Tag Manager with a server-side tagging environment like Stape or Google Cloud Platform.
You would use the standard Google Analytics Data API to pull your clean GA4 data, and, crucially, integrate it with Advertising platform APIs from channels like Facebook/Meta and Google Ads.
In this architecture, when the form is submitted, your website’s backend (which, as you noted, already has the correct UTM data) sends the conversion data directly to your server container.
This server container then uses the Advertising platform APIs to send the correct, validated conversion event, along with the correct UTM parameters from your database, to your advertising platforms.
It also sends a highly accurate conversion event to GA4.
This bypasses the fragile client-side browser issues like ad-blockers, consent banner problems, and redirect stripping entirely, ensuring that your advertising platforms and GA4 are all attributed correctly based on the data you know is accurate from your backend form submission record.
This API-driven approach provides superior data quality and is the industry standard for reliable conversion attribution in the face of increasing browser privacy restrictions.