How to track deep links when ESP link wrapping breaks them?
Matthew Whittaker
Co-founder & CTO, Suped
Published 23 Jul 2025
Updated 17 Aug 2025
8 min read
Sending emails with deep links can be a powerful tool for driving engagement, especially for mobile app users. These specialized links are designed to take recipients directly to specific content or sections within an application, bypassing the need to navigate through a homepage or general app store listing. The goal is a seamless user experience, but it often gets complicated when email service providers (ESPs) introduce their own tracking mechanisms, commonly known as link wrapping.
Most ESPs wrap every link in your email with their own tracking domain. This allows them to measure clicks, track engagement, and provide valuable analytics on your campaign performance. While this is crucial for understanding how your email marketing is performing, it can unintentionally interfere with the functionality of deep links, often breaking the intended direct app navigation.
The core challenge lies in balancing the need for accurate email click tracking with the desire for a smooth deep linking experience. When the ESP's redirect link hijacks the original deep link, it can prevent the app from opening correctly or direct users to a web page instead of the in-app content. This article explores why this happens and how to overcome these hurdles to ensure your deep links function as intended while still allowing for reliable tracking.
Understanding the conflict
Deep links rely on specific URL schemes or universal link configurations to launch an application and navigate to particular content. When an ESP wraps a deep link, it replaces the original URL with an intermediate tracking URL. This tracking URL then redirects the user to the original destination. The problem arises because this redirect often strips away or alters the necessary parameters that the mobile operating system (OS) or app needs to recognize and correctly process the deep link.
For instance, on iOS, universal links require specific configurations, including an Apple App Site Association (AASA) file, which maps website URLs to app content. When an ESP's tracking URL intervenes, the browser or OS might only see the ESP's domain, not your app's domain, preventing the universal link from being recognized. This can lead to the user being sent to a web browser, even if they have the app installed, or the link simply failing.
The challenge is to find a way for both the ESP's click tracking to work and the deep link to function correctly. Without careful consideration, you might lose valuable attribution data or provide a broken user experience. It's a common dilemma for marketers and developers trying to optimize their email campaigns for mobile users.
Why ESP link wrapping causes breakage
The primary reason for breakage is the redirect chain. When a user clicks a wrapped link, they first hit the ESP's tracking server, which records the click, and then redirects them to the original destination. This extra hop can disrupt the delicate mechanisms of deep linking.
Sometimes, the ESP's redirect introduces security headers or alters the URL in ways that prevent the mobile OS from correctly identifying it as a deep link. This behavior can vary across different browsers and operating systems, making it even harder to diagnose. For instance, some browsers might handle redirects differently, leading to inconsistent deep link performance.
Common causes for deep link failure
Redirect chains: Multiple hops can strip necessary deep link parameters or headers.
Security policy conflicts: ESP redirects may introduce policies that block app launch.
Domain mismatch: The OS checks the domain of the link, and if it's the ESP's, the app cannot be launched.
AASA/assetlinks.json issues: These files must be accessible from the clicked domain, which is usually the ESP's.
This leads to a frustrating user experience and can severely impact the effectiveness of your email campaigns. Additionally, if the deep link fails, your analytics might only record the initial click on the ESP's tracking URL, without providing insight into whether the user successfully reached the intended content within your app. This makes accurate attribution incredibly difficult.
Strategies for tracking deep links
One common approach is to prevent your ESP from wrapping deep links. Some ESPs offer an option to disable link wrapping for specific URLs or domains. If this is possible, it's often the simplest solution for ensuring your deep links function without interference. However, disabling wrapping means you lose the ESP's native click tracking, requiring an alternative tracking method.
A more robust and common solution is to use a dedicated deep linking service or mobile attribution platform. These platforms are designed specifically to handle the complexities of deep linking, including managing redirects and ensuring compatibility across various operating systems and devices. They can serve as the intermediary between your email and your app, providing both the deep link functionality and comprehensive click tracking.
ESP link wrapping
ESPs typically wrap all links for email campaign analytics, providing click data within their platform. This can break deep links, preventing users from reaching specific in-app content and impacting the user experience.
Breaks deep links: The intermediate URL interferes with app recognition.
Limited attribution: Only tracks the click on the ESP's domain, not in-app activity.
Dedicated deep linking solutions
Using specialized mobile deep linking platforms like Branch.io ensures deep links function correctly while providing advanced attribution.
Seamless user experience: Direct navigation to in-app content.
Comprehensive tracking: Attribution data for app opens and conversions.
Another strategy involves using custom tracking domains. By configuring your ESP to use a custom subdomain for its link wrapping (e.g., track.yourdomain.com), you can often maintain domain alignment, which is crucial for universal links and avoiding security flags. This can mitigate some of the issues associated with generic ESP tracking domains, improving your email deliverability rates and preventing blocklisting (or blacklisting).
Implementing deep link tracking solutions
When implementing deep link tracking, start by evaluating your current ESP's capabilities. Check if they offer specific features for deep linking or if there's an option to control link wrapping behavior. Some ESPs have native integrations with mobile attribution platforms that can streamline the process. If your ESP doesn't support these features, consider using a third-party solution.
Using a dedicated deep linking service typically involves generating unique deep links through their platform and then embedding those links into your emails. These services manage the redirects, ensuring the user is sent to the correct app destination while also capturing click data. They often provide SDKs for your mobile app to receive and process the deep link, along with comprehensive analytics dashboards.
Thorough testing is paramount. Send test emails to various devices, operating systems, and email clients (like Apple Mail, Gmail, Outlook) to confirm that your deep links are functioning as expected. Pay close attention to how different browsers handle redirects and whether the app launches correctly. Also, consider the impact on email link cloaking and click tracking to ensure compliance and deliverability.
Finally, monitor your deep link performance through the analytics provided by your chosen deep linking platform or your own app analytics. This allows you to identify any ongoing issues and optimize your strategy over time. Regularly check your domain reputation, too, as using shared domains for link shorteners can impact deliverability if not managed with a custom domain.
Views from the trenches
Best practices
Use a custom tracking domain with your ESP to improve link reliability and reputation.
Integrate directly with a dedicated deep linking service that understands email environments.
Thoroughly test deep links across various devices, operating systems, and email clients.
Ensure your mobile app's AASA or assetlinks.json file is correctly configured and accessible.
Common pitfalls
Relying on generic, shared domains for deep link tracking can hurt your domain reputation.
Ignoring the redirect chain created by ESP link wrapping, which can strip critical parameters.
Failing to account for different browser and OS behaviors when handling redirects and deep links.
Using free, unbranded short links that may lead to deliverability (or blacklist) issues.
Expert tips
If deep links are breaking, examine the redirect headers added by your ESP; they might be the culprit.
Consider a server-side solution where the ESP redirect passes through to your server, which then handles the deep link logic.
For complex scenarios, analyze wire-level data to pinpoint exactly where deep link parameters are being lost.
Ensure your deep link solution correctly handles deferred deep linking for users who don't have the app installed.
Expert view
Expert from Email Geeks says a custom domain is essential when using link shorteners or third-party tracking, as a shared domain will negatively impact content reputation.
2023-08-25 - Email Geeks
Marketer view
Marketer from Email Geeks says they are disabling ESP wrapping due to deep link issues and are now exploring how to track unwrapped deep links, considering short links like Firebase.
2023-08-26 - Email Geeks
Maintaining deep link integrity and tracking
Dealing with ESP link wrapping and deep links requires a strategic approach. While ESPs provide essential click tracking, their methods can conflict with the nuanced requirements of deep linking. The key is to either manage the ESP's wrapping behavior or leverage specialized tools designed to handle these complexities.
By understanding the technical reasons behind link breakage and implementing solutions like dedicated deep linking platforms or custom tracking domains, you can ensure your email campaigns deliver a smooth, direct experience for your mobile users. This not only improves user satisfaction but also provides the accurate attribution data needed to measure campaign success effectively. Ultimately, the goal is to enhance your email click through rate and overall campaign performance.