On this page
What this issue is
A visitor clicks an ad and lands on yoursite.com/app?utm_source=google&utm_campaign=spring&gclid=abc123. Your page has a Get the app button. If that button is a fixed link such as https://play.google.com/store/apps/details?id=com.example.app, none of those values travel with the visitor. The store opens with no sign of which campaign sent them.
- Ad clickURL has utm_campaign and gclid
- Landing pagePage loads with the parameters
- Get the app buttonFixed store link, no parameters added
- Store listingNo campaign information arrives
- InstallCounted as organic or unknown
The landing URL carries the data, but the store link does not.
Why it costs you leads or sales
Installs that come from paid campaigns look like organic or direct installs. Your ad reports show fewer results than you really got. Bidding systems that learn from conversions get less signal, and you may cut campaigns that actually work. You also cannot compare which creative or audience brings people who install and then buy.
Example: 100 real installs from one campaign. With the data lost, most show up as organic. Numbers are illustrative.
How to check if your site has it
Open your landing page with test parameters
Add them to the URL yourself, for example
?utm_source=test&utm_campaign=check1&gclid=TEST123.Inspect the Get the app button
Right-click the button, choose Inspect and read the
href. Or long-press it on a phone and copy the link address.Look for your values
The final link should contain
check1orTEST123in some form (for Google Play, inside areferrervalue; for an attribution link, as query parameters).Follow the click
Click the button and watch the address as it redirects. If the values vanish at any hop, note where.
Repeat on mobile
Some pages use a different button or banner on phones. Test the one visitors actually use.
How to fix it
The way you pass data differs by store. Google Play accepts a single referrer parameter that holds URL-encoded campaign values. The App Store uses campaign tokens (pt for provider and ct for campaign) on the link, and has no gclid slot. If you use an attribution provider (Adjust, AppsFlyer, Branch, Firebase), pass the values into that provider's link instead, using the parameter names in its documentation.
(function () {
var p = new URLSearchParams(window.location.search);
var keys = ['utm_source','utm_medium','utm_campaign','utm_content','utm_term','gclid'];
var found = [];
keys.forEach(function (k) {
if (p.get(k)) found.push(k + '=' + encodeURIComponent(p.get(k)));
});
if (!found.length) return;
document.querySelectorAll('a[data-store-link]').forEach(function (a) {
var url = new URL(a.href);
if (url.hostname === 'play.google.com') {
url.searchParams.set('referrer', found.join('&'));
} else if (url.hostname === 'apps.apple.com') {
if (p.get('utm_campaign')) url.searchParams.set('ct', p.get('utm_campaign'));
}
a.href = url.toString();
});
})();Add data-store-link to each store button so the script knows which links to change. Example: <a data-store-link href="https://play.google.com/store/apps/details?id=com.example.app">Get it on Google Play</a>. If the visitor's parameters were already stored (in a cookie or on an earlier page), read them from there instead of the URL.
Mark the button
In the block editor, select the button, open Advanced and add the CSS class
store-link, or use a Custom HTML block with thedata-store-linkattribute.Add the script
Use a header and footer scripts plugin or your child theme's footer to load the snippet on the app page.
Clear caches
Purge page cache and any CDN so the new script is served.
Add the attribute
Select the button, open Settings, then Custom attributes, and add
data-store-linkwith any value.Add the script
In Page settings, paste the snippet in Before </body> tag inside a script tag, then publish.
Create a Custom HTML tag
Paste the snippet inside script tags. Trigger it on DOM Ready for the app page.
Preview and publish
Use Preview with a tagged URL and check the button's href changed, then publish.
Use custom code
In Settings, then Custom code, add the snippet to the app page's body end. Wix buttons cannot take custom attributes easily, so change the selector to match the button's link, or use an HTML embed with your own links.
Inject the script
Add it under Settings, Advanced, Code Injection (footer), or in a Code Block on the page.
Mark the links
Use a Code Block for the buttons so you can add
data-store-link, or change the selector to the store domain, for examplea[href*="play.google.com"].
Add the markup
Put
data-store-linkon each store anchor.Include the script
Load it after the DOM or with
defer, then test with a tagged URL.
Before
- Button href is a bare store URL
- utm_campaign and gclid stay on the landing page
- Install appears as organic
After
- Button href carries a Play referrer or App Store campaign token
- Values reach your attribution tool
- Install is credited to the campaign
How to confirm it's fixed
- Open the landing page with test UTMs and a fake gclid and inspect the button href
- The store URL contains the encoded values (Play
referrer, or App Storect) - The values survive every redirect between click and store
- It works on both iPhone and Android layouts of the page
- A test install appears with the campaign in your attribution tool or the Play Console
- Visiting the page without parameters still gives a working store link
How to prevent it happening again
The usual cause is a redesign, a new button, a theme change or a cache update that replaces the link or removes the script. Keep the snippet in one place (a tag manager or shared template), add data-store-link to every new store button, and re-test with a tagged URL after any page change. Put a test URL in your launch checklist for every app campaign.
Parameters dropped
Leads or data lost
The store opens with no campaign data and the install is reported as organic.
Toggle to see what happens to campaign reporting.
How FunnelGuard handles this
FunnelGuard detects this issue. Its robot visitor opens your landing page with campaign parameters such as utm_campaign and gclid, finds the app store link and checks whether those values are passed through into it. If they are missing, you get one alert, sent after the check is repeated from a second region, with a screenshot and a likely cause. The test visit is marked (utm_source=funnelguard, fg_test=1) and never clicks real ads.
You can start on the Free plan (1 site, 2 journeys, daily checks, no card), or try any paid plan free for 3 days. A free read-only website audit is also available.
Questions people ask
Why are my app installs from ads showing as organic?
Often the landing page receives the UTMs and click id, but the store button links to a plain store URL. The store and your attribution tool then see no campaign data. Pass the values into the store link, then test with a tagged URL.
How do I pass UTM parameters to the Google Play Store?
Add a single referrer parameter to the Play link, holding your URL-encoded values, for example &referrer=utm_source%3Dgoogle%26utm_campaign%3Dspring. Google Play passes it to the installed app, where your SDK or the Play Console can read it.
Can I pass gclid to the App Store?
Not directly. The App Store link supports campaign tokens (pt and ct) but has no field for a click id. To keep a gclid, use an attribution provider's link that records it before sending the visitor to the store.
How do I check whether my Get the app button keeps campaign parameters?
Open the page with ?utm_source=test&utm_campaign=check1&gclid=TEST123, inspect the button's href and follow the click. Your test values should appear in the final store or attribution URL. If they vanish, note the step where they are lost.
Why does my app button lose parameters after a redirect?
A redirect rule or short link may not forward the query string. Check the redirect settings for an option such as pass query string, and test the full path from landing page to store.
Does this apply if I use Adjust, AppsFlyer or Branch?
Yes. The landing page still has to hand the campaign values to the provider's link, using the parameter names in its documentation. If the button points to a bare store URL instead of that link, the data is lost the same way.
Can FunnelGuard tell me if my store link drops UTMs?
Yes. FunnelGuard opens your landing page with campaign parameters like utm_campaign and gclid and checks whether they reach the app store link. It alerts you with a screenshot and a likely cause when they do not.
Related issues
- APP-004Store link has no campaign (no Play referrer, no App Store campaign token) so installs aren't attributedFix guide
- APP-016Attribution link (Adjust, AppsFlyer, Branch, Firebase) broken or sending to the wrong storeFix guide
- APP-018Deferred deep link loses the campaign or destination after installFix guide
- APP-006iPhone visitors sent to Google Play (or Android visitors to the App Store)Fix guide
- APP-007Get the app button leads to a 404, a loop or a dead page instead of the storeFix guide
- APP-001App Store or Google Play link opens the wrong or an old appFix guide