Expand my Community achievements bar.

Announcement: Calling all learners and mentors! Applications are now open for the Adobe Analytics 2024 Mentorship Program! Come learn from the best to prepare for an official certification in Adobe Analytics.
SOLVED

How to set trackState value (state) in trackAction method for mobile app

Avatar

Level 1

Inside launch mobile property, we are trying to identify if we can perform below tasks

- capture value of 'state' variable in event data by using a data element.
- when Track Action event happens, use that data element inside rule, under attach data action type.

Basically we are trying to capture value of state variable and send it along with every track action happening in app.

One possibility we thought of is to ask mobile developers to add 1 new context variable and give value of state variable to it in every trackAction method which exists inside app code. But its kind of a little huge task for developers to update the existing code. So we are looking any alternatives which can be achieved using launch.

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

When you say value of 'state' variable, do you mean the value of "loginClicked" in this sample:

MobileCore.trackAction("loginClicked", additionalContextData);

 

Basically the Mobile App version of "custom link" value?

 

You can get this in processing rules using the "a.action" item, unfortunately, Adobe always adds the "AMACTION:" prefix to the action names, but I think that this happens after processing rules, so you should be able to get the value as sent into your dimension.

Jennifer_Dungan_0-1689347488360.png

 

You can use it in conditions as well:

Jennifer_Dungan_1-1689347548631.png

 

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

When you say value of 'state' variable, do you mean the value of "loginClicked" in this sample:

MobileCore.trackAction("loginClicked", additionalContextData);

 

Basically the Mobile App version of "custom link" value?

 

You can get this in processing rules using the "a.action" item, unfortunately, Adobe always adds the "AMACTION:" prefix to the action names, but I think that this happens after processing rules, so you should be able to get the value as sent into your dimension.

Jennifer_Dungan_0-1689347488360.png

 

You can use it in conditions as well:

Jennifer_Dungan_1-1689347548631.png