Is there a way to include Page Name when calling trackAction from the iOS Mobile SDK? | Community
Skip to main content
ryanz28689484
February 11, 2019
Solved

Is there a way to include Page Name when calling trackAction from the iOS Mobile SDK?

  • February 11, 2019
  • 2 replies
  • 5512 views

As the title says, I am looking to include the Page Name when calling trackAction(action:data:) from the iOS Mobile SDK version 4.17.0. It looks like this is possible from the Web SDK, but I don't see a way to do this from iOS. Is there a specific context data key that I can set?

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 Asheesh_Pandey

Hi,

I agree with Jen Andrews here...you don't need to set page name with trackAction calls. However, in some cases, you may want to set pagename with trackAction calls.

How page name gets set:

trackState reports the View State as Page Name, and state views are reported as Page View in Analytics. The value is sent to Analytics by using the page name variable (pagename=value).

If you really need to set pagename with trackAction call I would recommend setting pagename in contextData with trackAction call and then map that in a custom prop in processing rule.

Example

SDK:

[ACPCore trackAction:@"my_action" data:@{@"action_pagename":@"my page name"}];

Processing Rule:

Rule Set Value

Condition

If a.action equals 'my_action'
ActionOverwrite value of prop1 to context data 'action_pagename'

This setting will allow you to set pagname in custom prop with trackAction.

Note: you can directly overwrite pagename with any contextData value in proc rules but it may have an impact over data collection in Adobe. Hence you must talk with processing rule expert about its consequences over data collection/reporting in Adobe beforehand.

2 replies

Jennifer_Andrews
Adobe Employee
Adobe Employee
February 25, 2019

Hi ryanz28689484

Setting a Page Name in trackAction call is really a moot point, as a trackAction is not captured as a pageView nor is the value captured in the Pages Reports.  trackAction method is reported in Action Name report and in the Links -> Custom Links Report.

Is there a specific reason you are attempting to capture a pagename on an Action/Link call?

Asheesh_Pandey
Community Advisor
Asheesh_PandeyCommunity AdvisorAccepted solution
Community Advisor
March 26, 2019

Hi,

I agree with Jen Andrews here...you don't need to set page name with trackAction calls. However, in some cases, you may want to set pagename with trackAction calls.

How page name gets set:

trackState reports the View State as Page Name, and state views are reported as Page View in Analytics. The value is sent to Analytics by using the page name variable (pagename=value).

If you really need to set pagename with trackAction call I would recommend setting pagename in contextData with trackAction call and then map that in a custom prop in processing rule.

Example

SDK:

[ACPCore trackAction:@"my_action" data:@{@"action_pagename":@"my page name"}];

Processing Rule:

Rule Set Value

Condition

If a.action equals 'my_action'
ActionOverwrite value of prop1 to context data 'action_pagename'

This setting will allow you to set pagname in custom prop with trackAction.

Note: you can directly overwrite pagename with any contextData value in proc rules but it may have an impact over data collection in Adobe. Hence you must talk with processing rule expert about its consequences over data collection/reporting in Adobe beforehand.