How to set trackState value (state) in trackAction method for mobile app | Community
Skip to main content
New Participant
July 14, 2023
Solved

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

  • July 14, 2023
  • 1 reply
  • 891 views

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

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

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.

 

You can use it in conditions as well:

 

 

 

1 reply

Jennifer_Dungan
Jennifer_DunganAccepted solution
New Participant
July 14, 2023

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.

 

You can use it in conditions as well: