Solved

How to send utm parameters from users that came from Web to Mob app


Badge


Hi,
I need advise on how to better organize tracking via Amplitude.

CONTEXT

We have 3 different space:
 A) Public website with content B) Web app (Single page application with some onboarding form) C) IOS mobile app

Events coming from A are sometimes (usually) coming from anonymous users until they sign up or log in and then we identify them. When user login via B) web platform we create a user_id and he can fill in the onboarding form or see a screen with QR code or button to download the app. 

Or user can sign in via app for a first time and we create user_id at that moment. 

I want to implement JS SDK Web Attribution to track some activity on Web ( click button, view page) but most important store UTM parameters as user property and send it with all event user perform on mob app. 
 

So the goal performs behavior user analysis in mobile app based on the source he came from (utm source, campaign and others). 
 

The questions are:
1) Could I create two different projects Web and Mobile and share one user_id between these two projects?
2) When the user login via the existing user_id and we have some utm tag related to them from the website, send all these user properties with events. 
3) or its better to keep one project (Web + Mobile)? 
Now it is more interesting to keep track of mobile activity separately, and track MAU  on Web (marketing) and Mobile MAU - core product. 

Or maybe there are better way to track marketing source( utm tag) and link it to users. 


 

 

icon

Best answer by ttan 1 February 2023, 02:32

View original

10 replies

Userlevel 1
Badge +2

1) Could I create two different projects Web and Mobile and share one user_id between these two projects?

While it is possible to create two different projects where users share the same user_id, please keep in mind that data in each project is isolated from one another. This means that you won’t be able to perform cross-platform analysis if you send data to two different projects. Unless the Portfolio add-on is purchased, which is only available on the paid plan.

2) When the user login via the existing user_id and we have some utm tag related to them from the website, send all these user properties with events. 

Both our JS SDK and the latest Typescript SDK supports capturing UTM parameters as user properties. The Typescript SDK is most robust, and it offers more attribution tracking options (see configurations here).

3) or its better to keep one project (Web + Mobile)? 
Now it is more interesting to keep track of mobile activity separately, and track MAU  on Web (marketing) and Mobile MAU - core product. 

It really depends whether or not you want to perform cross-platform analysis. Having separate projects can be a cleaner experience if the Web and Mobile event taxonomy are very different, but data needs to be in a single project if you would like to understand how users use both mobile and web together.

 

 

Badge

Let's say I create one project for Web + Mob
Scenario 1. 
The user opens the site with utm tag, visits a few pages and does not sign in ( no user_id)
then the same user downloads the app and sign in ( we create user_id)
Basically, it is the same user.

Scenario 2
The user opens the site with utm tag, visits a few pages and signs in ( we create user_id)
then the same user downloads the app and signs in ( already has user_id)

How Amplitude will count new users in both scenarios?
What is the best way to have one project but be able separate mobile activity from website activity?
let's say I want to calculate the retention of my mobile users, what parameters I should pass to be able to filter Web or Mob app in my one project?

Userlevel 1
Badge +2

Scenario 1. 
The user opens the site with utm tag, visits a few pages and does not sign in ( no user_id)
then the same user downloads the app and sign in ( we create user_id)
Basically, it is the same user.

 

Amplitude will count this user as two individual users. If the user ends up logging in on the website and you assign a user_id, Amplitude will automatically merge the web and mobile profiles together. 

 

Please review this doc for more details on how Amplitude tracks anonymous users and when we merge user profiles together. 

 

Scenario 2
The user opens the site with utm tag, visits a few pages and signs in ( we create user_id)
then the same user downloads the app and signs in ( already has user_id)

 

Amplitude will merge these user profiles together and count them as a single new user. This will occur as long as the user is assigned a unique user_id that will never update.

 

What is the best way to have one project but be able separate mobile activity from website activity? let's say I want to calculate the retention of my mobile users, what parameters I should pass to be able to filter Web or Mob app in my one project?

 

If you are using our client-side SDKs, there will be a user property called “Platform” that will automatically be set to “Web” for web SDK events and “iOS” or “Android” for mobile SDK events. For server-side SDKs, please be sure to set a “Platform” user property.

 

Additionally, our customers typically use a third party attribution provider to send mobile attribution over. Here’s a doc with details on how Adjust, AppsFlyer, Branch, etc integrate with Amplitude.

Badge

What about mobile version of site? 
How to split Mobile app and Mobile web site?
 

Userlevel 6
Badge +9

Thanks for this follow up question @Julia. Were you able to make progress? I’ve looped in the team who can take a closer look.

Userlevel 1
Badge +2

@Julia 

What about mobile version of site? 

 

Please review the configuration section of our Browser SDK. A value for `appVersion` will need to be set.

 

How to split Mobile app and Mobile web site?

 

The Browser SDK will be used to track mobile web and desktop web. Platform will be set to `Web` by default. iOS and Android SDK will set platform to `iOS` or `Android`.

To distinguish mobile web vs. desktop web, you’ll need to set up a custom user property to track this.

Userlevel 6
Badge +9

Thanks for closing the loop @ttan! 😀

Badge

@Jeremie Gluckman 
You mentioned that I should see Web, IOS or Android under Platform. Is it right, that Platform shows from were events were send? And basically it is the source of events that we see in the Data Events tracking plan.  
Source: Browser SDK  = Platform: Web
IOS SDK = IOS
Python SDK = backend


But I have a lot of IPhones types. Could you please help how to fix it? 

 

Userlevel 5
Badge +8

@Julia that’s right, the Platform property shows where events were sent from. Here’s more on that. The iphone type showing up under Platform is odd, as it should show up under device family and type. Let me ask someone from the team to look into that.

Badge

Following up on this, if you are going from web-to-app in the anonymous scenario, what happens if you set the same Device ID in the app as you did on the web? (presumably because you passed it in as a deep-link parameter when user clicked through on a ‘launch’ button on the website)

 

Is Amplitude smart enough to attribute all events to this same anonymous user, even though they are originating from the same platforms?

If this is the case, will the UTM params received on the web session automatically be applied to the app user? (ie: presumably they are store as user properties on the same user instance)

Reply