Use Cases: Identify App User Sources (Deferred Deep Linking Solution)
Tags: mobile, androiddev, android
Published: 2024-06-14 06:50:37

Automatically tagging the promotional source of an app's new users is a key requirement. However, passing parameters from the web pages of multiple channels to the app does not have a direct technical solution. The following are two solutions using the Mogua SDK.

# Use Case 1: Measure how many users an influencer invites to your app

When you are running an affiliate program for your app, your affiliate partners will invite new users with a link you give them. Ideally, the invitation relationship can be immediately built, and the affiliate can see their invite number add up as soon as the new users are activated without needing them to fill in anything like an invitation code.

To build this seamless experience for the user, the app developers need to pass the affiliate parameters from the link to the app, and the solution to it is not very direct. Here’s how we realize it: 

1. We embed the web SDK on our website and include parameters like affiliate ID in the link given to the affiliate partners. The new users will use this link to go to app stores to download the app. Also, we embed the app SDK on our app.
2. When new visitors open the link, initialize the web SDK which will report a web event and send the affiliate parameters to Mogua and generate a web unique identifier for this visitor. You can see these parameters reported in the statistics module in the dashboard and the event type is Web.
3. Optional: you place a download button in the link, when it is clicked, a download event will be reported.
4. When a new user installs your app and opens it, the app SDK will report an event and generate an app unique identifier for this user.
5. In Mogua server, the algorithm will match this app unique identifier with a web unique identifier. If there’s a match, the parameter values associated with the web identifier will pass to the app. In this case, the affiliate’s id can be linked with the new user immediately.

# Use Case 2: Ad network attribution for app installations

Another traffic source for an app is ad networks. Since the app stores cannot attribute the accurate sources of all the ad networks, we need to have a solution to measure the downloads brought from ads.

The solution is similar to use case one:

1. When you set a link in your ad, don’t just use the app store link but use a hosted webpage with web SDK embedded and custom parameters that can identify the ad.
2. When someone clicks the ad and opens the link, the web SDK generates a unique identifier and reports the event to Mogua server. The ad parameters are recorded at the same time. You can set an auto-redirect to app stores on your link, so visitors don't have to click again.
3. If later this visitor installs the app, they will be identified. In this way, the app operators can measure how many downloads come from each ad.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0zkw62vlhgbqmqp4jwd.png)


A similar solution can be applied in email marketing and coupons. You can set some test parameters on our [live demo](https://www.mogua.io/products?utm_source=devto&utm_medium=article&utm_campaign=002) and try the app install process like a user.