Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Deeplink UTM tracking

Avatar

Level 5

We are just starting to use deeplinks in one of our apps and need to set up UTMs for them as they will be used in emails, push, etc for different campaigns.

I've been searching how to do this setup, and Adobe documentation said that for an app it is tracked using acquisition and also on mobile services. However, I was just informed by our Adobe solution account manager that he got in touch with the technical team and that this module is not available anymore,

Therefore, how can I track the UTMs from deeplinks? is there a way for me to create an evar for each category (source, medium, campaign)? but how would I create a rule/data element for that? Would it be able to recognize which screens (trackState) from the app the user from that deeplink reached? or even if a trackAction was done?

Thanks in advance

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 5

To track UTMs from deeplinks, you can create an eVar for each category (source, medium, campaign).

To create a rule/data element for that, you can use the "query string parameter" or "URL parameter" option to extract the UTM parameters from the deeplinks. The query string parameter is the part of the URL after the question mark (?), and the URL parameter is the part of the URL after the slash (/).

For example, if your deeplink is "myapp://example.com/path?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale", you can create three separate data elements using the query string parameter option to extract the UTM parameters: "utm_source", "utm_medium", and "utm_campaign".

To recognize which screens (trackState) from the app the user reached from that deeplink, you can pass the UTM parameters as context data when you call the trackState method. For example:

AdobeAnalytics.trackState("home", {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer_sale"
});
This will associate the UTM parameters with the "home" screen in your app.

Similarly, if you want to track if a trackAction was done, you can pass the UTM parameters as context data when you call the trackAction method. For example:

AdobeAnalytics.trackAction("button_click", {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer_sale"
});
This will associate the UTM parameters with the "button_click" action in your app.

Overall, by passing the UTM parameters as context data when you call the trackState and trackAction methods, you can track which screens and actions users reach from deeplinks and associate them with the corresponding UTM parameters.

You can use Adobe Analytics and create an eVar for each category (source, medium, campaign) to store the corresponding UTM parameters. You can then use a rule or data element to extract the UTM parameters from the deep link and set them as values for the eVars.

To create a rule or data element for this, you can use Adobe Launch or Adobe Experience Platform Launch to set up a custom code block that extracts the UTM parameters from the deep link and sets them as values for the corresponding eVars. For example, you can use JavaScript code to extract the UTM parameters from the deep link and set them as values for the eVars.

Regarding the tracking of which screens (trackState) from the app the user reached from the deep link, you can use Adobe Analytics mobile SDKs to track screen views and events. You can set up tracking for specific screens in your app by using the trackState method, which allows you to specify the name of the screen being viewed. You can also use trackAction to track events that occur within the app.

To capture the screen names or event names, you can create a new eVar and use the trackState or trackAction methods to set the value of the eVar to the screen name or event name. You can then use this eVar to track which screens or events users are interacting with in your app.

 

For example, to capture the source parameter from a deeplink, you can set up a rule like this:

  • Trigger: Page Load
  • Condition: URL matches regular expression utm_source=(.*)
  • Action: Set eVar1 to {{ RegExp.$1 }}

This rule will capture the value of the utm_source parameter from the URL and pass it to eVar1.

To track which screens the user reaches from the deeplink, you can use the "pageName" variable in Adobe Analytics. You can set up rules to change the pageName variable based on the screen the user is on. For example, if the user lands on a specific screen after clicking a deeplink, you can set the pageName variable to the name of that screen.

Similarly, you can use the "event" variable to track if a trackAction was done. You can set up rules to trigger a trackAction based on user interactions on the app and pass relevant data to the corresponding variables.

 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 5

To track UTMs from deeplinks, you can create an eVar for each category (source, medium, campaign).

To create a rule/data element for that, you can use the "query string parameter" or "URL parameter" option to extract the UTM parameters from the deeplinks. The query string parameter is the part of the URL after the question mark (?), and the URL parameter is the part of the URL after the slash (/).

For example, if your deeplink is "myapp://example.com/path?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale", you can create three separate data elements using the query string parameter option to extract the UTM parameters: "utm_source", "utm_medium", and "utm_campaign".

To recognize which screens (trackState) from the app the user reached from that deeplink, you can pass the UTM parameters as context data when you call the trackState method. For example:

AdobeAnalytics.trackState("home", {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer_sale"
});
This will associate the UTM parameters with the "home" screen in your app.

Similarly, if you want to track if a trackAction was done, you can pass the UTM parameters as context data when you call the trackAction method. For example:

AdobeAnalytics.trackAction("button_click", {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer_sale"
});
This will associate the UTM parameters with the "button_click" action in your app.

Overall, by passing the UTM parameters as context data when you call the trackState and trackAction methods, you can track which screens and actions users reach from deeplinks and associate them with the corresponding UTM parameters.

You can use Adobe Analytics and create an eVar for each category (source, medium, campaign) to store the corresponding UTM parameters. You can then use a rule or data element to extract the UTM parameters from the deep link and set them as values for the eVars.

To create a rule or data element for this, you can use Adobe Launch or Adobe Experience Platform Launch to set up a custom code block that extracts the UTM parameters from the deep link and sets them as values for the corresponding eVars. For example, you can use JavaScript code to extract the UTM parameters from the deep link and set them as values for the eVars.

Regarding the tracking of which screens (trackState) from the app the user reached from the deep link, you can use Adobe Analytics mobile SDKs to track screen views and events. You can set up tracking for specific screens in your app by using the trackState method, which allows you to specify the name of the screen being viewed. You can also use trackAction to track events that occur within the app.

To capture the screen names or event names, you can create a new eVar and use the trackState or trackAction methods to set the value of the eVar to the screen name or event name. You can then use this eVar to track which screens or events users are interacting with in your app.

 

For example, to capture the source parameter from a deeplink, you can set up a rule like this:

  • Trigger: Page Load
  • Condition: URL matches regular expression utm_source=(.*)
  • Action: Set eVar1 to {{ RegExp.$1 }}

This rule will capture the value of the utm_source parameter from the URL and pass it to eVar1.

To track which screens the user reaches from the deeplink, you can use the "pageName" variable in Adobe Analytics. You can set up rules to change the pageName variable based on the screen the user is on. For example, if the user lands on a specific screen after clicking a deeplink, you can set the pageName variable to the name of that screen.

Similarly, you can use the "event" variable to track if a trackAction was done. You can set up rules to trigger a trackAction based on user interactions on the app and pass relevant data to the corresponding variables.

 

Avatar

Level 5

I´ve a new question regarding this post.

we have a few deep links that are working properly. However, once I add UTM to them, they stop working. 
Should each UTM deeplink be added in the app´s code?

how can I make this work?

Avatar

Level 5

You ought to make sure that the UTM parameters are accurately added to the deep link. UTM parameters may be created and structured appropriately using tools such as the Google Analytics Campaign URL Builder.