Web-to-App Forwarding
Overview
Web-to-App Forwarding bridges the gap between your mobile website and mobile app by preserving campaign attribution data when users transition from web to app. Instead of losing valuable marketing information about how users discovered your app, this feature automatically transfers UTM parameters or Singular WP parameters from web campaigns into your website button or link to get or open your mobile app.
When implemented, Web-to-App Forwarding enriches your mobile app attribution reports with the original web campaign source, helping you understand the complete user journey from initial web discovery to app install or re-engagement.
How It Works:
- A user lands on your mobile website via a web campaign (e.g., Google Ads with UTM parameters)
- The Singular Web SDK detects these parameters in the page URL
-
When the user clicks your app install/open button, the SDK automatically
appends these parameters as
_web_paramsto your Singular Link - Singular attributes the mobile install or re-engagement to the original web campaign
Before and After
Before Web-to-App Forwarding:
All mobile installs from your website are grouped under a generic "Mobile Web to App" source, hiding the actual campaign performance.
After Web-to-App Forwarding:
Mobile installs now show the actual web campaigns that drove users to your website (e.g., "Adwords", "Some_source"), providing actionable attribution insights.
Prerequisites
-
A mobile app integrated with the Singular SDK. NOTE: Deep link support must be configured to support re-engagement on web-to-app flows.
- Singular Web SDK version 1.0.8 or higher integrated on your mobile website either using the Native JS or Google Tag Manager approach.
- Singular campaign parameters applyed to your Web Campaign destination URLs.
-
A Singular Link configured as a Web-to-App baselink for your Mobile App.
Important: Contact your Customer Success Manager to obtain your Web-to-App baselink.
Implementation Methods
The implementation method is based on how the Singular WebSDK was implemented on your site.
Method 1: Native JavaScript SDK Implementation Options:
The Singular Web SDK provides two JavaScript functions for Web-to-App Forwarding. Choose the method that best fits your implementation:
Option A: openApp() - Automatic Redirect
Use this method when you want to immediately redirect users to your app (or App Store if not installed).
| Description | Builds the Web-to-App link with captured parameters and automatically redirects the user |
| Signature |
singularSdk.openApp(baseLink, deeplink, passthrough, deferredDeepLink)
|
| Parameters |
|
| Example |
|
Option B: buildWebToAppLink() - Manual Control
Use this method when you want to construct the link but control when/how it's triggered.
| Description | Returns the complete Web-to-App link with parameters; you decide how to use it |
| Signature |
singularSdk.buildWebToAppLink(baseLink, deeplink, passthrough, deferredDeepLink)
|
| Parameters |
Same as openApp() above
|
| Example |
|
Method 2: Google Tag Manager SDK Implementation Options
GTM implementation is ideal when you want to manage Web-to-App links without modifying website code directly. There are two approaches:
Option A: Dynamic Link Replacement (Recommended)
Automatically updates all Singular Links on your page after the Web SDK initializes.
- In GTM, create a new Custom HTML Tag
- Configure it to fire after your Singular Init Tag using Tag Sequencing
- Paste the following code:
<script>
(function() {
// Replace with your Web-to-App baselink
var baseLink = "https://mydomain.sng.link/Auour/55ba";
// Extract optional parameters from URL
var urlParams = new URLSearchParams(window.location.search);
var deeplink = urlParams.has('_dl') ? decodeURIComponent(urlParams.get('_dl')) : '';
var deferredDeepLink = urlParams.has('_ddl') ? decodeURIComponent(urlParams.get('_ddl')) : '';
var passthrough = '';
function replaceSngLinks() {
if (window.singularSdk && typeof window.singularSdk.buildWebToAppLink === 'function') {
var webToAppLink = window.singularSdk.buildWebToAppLink(
baseLink,
deeplink,
passthrough,
deferredDeepLink
);
if (webToAppLink) {
// Update all Singular Links on the page
var links = document.querySelectorAll('a[href*="sng.link"]');
links.forEach(function(link) {
link.href = webToAppLink;
});
}
}
}
// Run immediately and after 1 second (for dynamically loaded content)
replaceSngLinks();
setTimeout(replaceSngLinks, 1000);
})();
</script>
Configuration:
-
Update
baseLinkwith your provided Singular Web-to-App link -
The code checks for
_dl(deep link) and_ddl(deferred deep link) parameters in your page URL and includes them automatically -
All existing
sng.linklinks on your page will be updated with web parameters
Option B: Button Click Trigger
Fires the Web-to-App redirect only when a specific button is clicked.
- Create a Custom HTML Tag in GTM
- Set the trigger to fire on your specific button click event
- Use the following code structure:
<script>
(function() {
if (window.singularSdk && typeof window.singularSdk.openApp === 'function') {
var baseLink = "https://mydomain.sng.link/Auour/55ba";
var deeplink = '';
var passthrough = '';
var deferredDeepLink = '';
singularSdk.openApp(baseLink, deeplink, passthrough, deferredDeepLink);
}
})();
</script>
Enhance Mobile Web-to-App Attribution accuracy with this tip:
TIP! A common challenge in mobile advertising attribution occurs with in-app browsers. Mobile in-app browser web views (like those used by Facebook, Instagram, and TikTok) can cause attribution loss due to browser context switching—from the time an ad is clicked until the app download link is clicked, or if a user moves to the mobile device’s native browser before clicking the link.
To help minimize attribution loss use the proper Singular tracking link format for each of these ad networks. The link can be built to redirect a user to your website landing page or direct to the app store. This method allows for a mobile click to be captured before the redirection to the in-app browser. Flow the guides here:
Parameter Priority and Mapping
Parameter Capture Priority
The Web SDK automatically captures parameters from your page URL in this priority order:
-
Singular WP parameters (highest priority) - Custom parameters
prefixed with
wp_ -
UTM parameters - Standard marketing parameters like
utm_source,utm_campaign
UTM to Singular Dimension Mapping
UTM parameters from your web campaigns are automatically mapped to Singular reporting dimensions:
| UTM Parameter | Singular Dimension |
|---|---|
utm_source
|
Source |
utm_campaign
|
Campaign Name |
utm_content
|
Creative Name |
utm_term
|
Keyword |
utm_medium
|
Available in user-level exports |
Note: All captured parameters are also preserved in
the
passthrough column of
user-level exports
for granular analysis.
Reporting
After implementation, mobile app installs and re-engagements originating from your website will appear in Singular reports with:
- Tracker Name: "Mobile Web to App"
- Link Type: "Mobile Web to App" (new dimension)
- Source/Campaign/Creative: Original web campaign parameters (if UTM parameters were present)
This allows you to measure the true ROI of web campaigns that drive mobile app growth, not just immediate web conversions.
Troubleshooting
Links aren't being updated
- Verify the Singular Web SDK is loaded before your Web-to-App code executes
- Check browser console for JavaScript errors
-
Confirm your baselink is correctly formatted (should include
sng.link)
Web parameters aren't appearing in reports
- Ensure your website URL contains UTM parameters or Singular WP parameters
- Verify the Web SDK version is 1.0.8 or higher
-
Check that the
_web_paramsquery string is present in the generated link
Need additional help?
Contact your Singular Customer Success Manager for implementation assistance and baselink provisioning.