See Trackactions made in each screen - mobile app | Community
Skip to main content
Level 5
November 18, 2022
Question

See Trackactions made in each screen - mobile app

  • November 18, 2022
  • 1 reply
  • 948 views

Hi!
I asked our dev team to implement trackAction and TrackState for our app so we can have page names for each screen and see the actions done. It is working and I can get the data for them individually (see the screen names instances and Actions/Custom links instance results).

However, I've been trying to see the actions that happened on some specific screens but got 0 results. Is it possible to do that?
Ex:

I also tried the opposite, making a list of the actions and breaking an action down by the screen name (the same action can happen on different pages on our app, so I would like to know which page this action is working the best).. but the same happen.

Is there a way for me to know app actions that happen on a single screen?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 18, 2022

Hi, 

 

So trackState is a page view event, and trackAction is a click or an interaction event.. the two don't correlate with one another, and if you are firing both for every screen loaded you are using up 2 server calls each time.

 

If you want to know the page name on your actions, it's best to create a context variable like "site.pageName", then map that context variable to a prop or evar which is tracked on both page views and actions.

 

So for instance, lets say you have an app using the following flow:

1. User Opens App (lands on the home page)

2. User Clicks on a Link to go to Page 2 (you don't probably want an action at this time... just the page view on Page 2)

3. Use Clicks on an interaction item on Page 2 (you want to track a trackAction here)

 

 

So 

you would set up a context variable site.pageName

 

1. on the home page, with your trackState call, you would also pass this context variable

 

additionalContextData.put("site.pageName", "homePage");
MobileCore.trackState("homePage", additionalContextData);

 

 

2. On page 2, you would do the same trackState (except both the standard pageName value and your custom value would change to "page 2" or whatever you want to call it

 

3. When the user interacts with the element you want to track

 

additionalContextData.put("site.pageName", "page 2");
MobileCore.trackAction("Interaction Clicked", additionalContextData);

 

 

 

Important Note: do not map your site.pageName value to Page Name using processing rules (this will make all your actions also count as page views which will inflate your page views)

 

 

A lot of Adobe clients already use this eVar Page Name concept on their web pages, since the default Page Name is not available on Custom Links, and the default Page Name is limited to 100 characters, whereas if you use a Hit Level eVar, you can store 255 characters.

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 18, 2022

To add some additional clarification:

 

trackState is the equivalent of the s.t() call on Web

trackAction is the equivalent of the s.tl() call on Web

 

When you track a click on your website, you don't track both s.t() and s.tl() - this will massively inflate your page views.