When a visitor leaves a Webflow landing page for an app or vendor subdomain, the gclid and UTMs are lost and the conversion is credited to the wrong domain.
If you want attribution to survive the move from a Webflow site to a web app, a booking tool or a checkout, carry the click IDs and UTMs across yourself and store them with the lead. GA4’s cross-domain setting helps, but it only covers part of the problem.
Where Attribution Breaks
| Setup | What Happens |
|---|---|
example.com to app.example.com |
Same root domain, so GA4 cookies are shared. Breaks only if the app uses a different GA4 property or doesn’t load the tag. |
example.com to exampleapp.io |
Different domain. A new session starts with your own site as the referrer. |
example.com to a vendor domain (booking, checkout, forms) |
You often can’t add your tag at all. The conversion happens where you can’t see it. |
| Any of the above | The gclid stays behind in the landing page URL, so Google Ads can’t match the conversion to a click. |
Step 1: Use One GA4 Property & Configure Domains
- Load the same GA4 measurement ID on the Webflow site and the app.
- In GA4, go to Admin > Data streams, open the stream, then Configure tag settings > Configure your domains.
- Add every domain a visitor can pass through.
- Click from the site to the app and confirm the URL gains a
_glparameter.
This keeps the session together in GA4. It doesn’t pass the gclid to your app, and it doesn’t work if a redirect or the vendor strips the _gl parameter.
Step 2: Capture Click IDs on the Landing Page
Save the click IDs and UTMs the moment the visitor arrives. Add this to the Webflow site’s head code:
<script>
(function(){
var keys = ['gclid','gbraid','wbraid','fbclid','msclkid','utm_source','utm_medium','utm_campaign','utm_term','utm_content'];
var params = new URLSearchParams(location.search);
var saved = {};
try { saved = JSON.parse(localStorage.getItem('attribution') || '{}'); } catch (e) {}
var found = false;
keys.forEach(function(k){
if (params.get(k)) { saved[k] = params.get(k); found = true; }
});
if (found) {
saved.landing_page = location.href.split('?')[0];
localStorage.setItem('attribution', JSON.stringify(saved));
}
window.attribution = saved;
})();
</script>
This stores an identifier in the browser, so run it under the same consent category as your ad tags.
Step 3: Carry Them Across the Boundary
Local storage doesn’t cross domains, so the values have to travel in the link. This adds them to every link that points at the app:
<script>
document.addEventListener('DOMContentLoaded', function(){
var a = window.attribution || {};
document.querySelectorAll('a[href*="app.example.com"], a[href*="exampleapp.io"]').forEach(function(link){
var url = new URL(link.href);
Object.keys(a).forEach(function(k){
if (k !== 'landing_page' && !url.searchParams.has(k)) { url.searchParams.set(k, a[k]); }
});
link.href = url.toString();
});
});
</script>
For forms, add hidden fields named gclid, utm_source and so on, and fill them from window.attribution the same way.
Step 4: Store Them With the Lead
On the app side, read the parameters on the first page and save them to the user or lead record at signup. This is the step that matters most. Once the gclid is in your database or CRM, attribution no longer depends on a cookie surviving.
- Save
gclid,gbraidandwbraidin their own fields. - Save the UTMs as first touch values and don’t overwrite them.
- Save the timestamp of the click or signup.
Step 5: Send Offline Conversions to Google Ads
When the lead becomes a real conversion (a paid account, a qualified lead, a booked call that happened), upload it to Google Ads with the stored click ID:
- The
gclid, orgbraid/wbraidfor some iOS traffic - The conversion name, time and value
- An order or lead ID, so the same conversion isn’t counted twice
The click has to be within 90 days. If you collect an email, enhanced conversions for leads can match on a hashed email when there’s no click ID.
Google Ads now optimizes toward conversions that happened in your app, not form fills on the landing page.
Vendor Domains You Can’t Tag
- Use the vendor’s own settings. Most booking and checkout tools accept a GA4 ID or GTM container, and pass through UTM parameters.
- Send a return URL. Redirect back to a thank you page on your domain and fire the conversion there.
- Use webhooks. Have the vendor post the completed booking or payment to your server, then send the conversion from there.
- List the vendor as an unwanted referral in GA4, under Configure tag settings > List unwanted referrals, so returning visitors aren’t credited to it.
Related: UTM attribution, web to app cross-device attribution and broken attribution in HubSpot.