Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Capture Activity Map Context Data

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

11-01-2019

Hello,

I need to capture the Activity Map "region" whenever the user clicks a link on my site but before the s.tl action is fired.  I am aware I can use Processing Rule to copy this value but I need the value client-side.  I can see the value in the EC Debugger so I know it's working properly.

I've tried the following without success:

console.log('activity map value=' + s.contextData['a.activitymap.region']);

console.log('activity map value=' + s.contextData['c.a.activitymap.region']);

console.log('activity map value' + s.ActivityMap.region);

Any thoughts on how I can get this value?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

470 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

470 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

15-02-2019

The plugins function should be doing the trick, but if not, you could use Object.watch() to determine when the contextData variable changes, then insert your code after that takes place. I found this thread on StackOverflow that might help:

javascript - Break on a change of variable value - Stack Overflow

Basically you'll want to figure out exactly when the activity map variable is populated, then you'll be able to insert your own code after that (but before the image request is sent). Bear in mind that this might require inserting code where Adobe says you shouldn't, but hopefully that isn't the case.

Answers (4)

Answers (4)

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

08-02-2019

Gigazelle​ - nope, unfortunately that didn't work.  I tried all three in the original post inside of the doPlugins and got the following in the console (basically the same as outside of the doPlugins section):

activity map value=

activity map value=undefined

activity map value=function(e){for(var t,a=f.regionIDAttribute||"id";e&&(e=e.parentNode);){if(t=o(e,a,a,a))return t;if("BODY"==e.nodeName)return"BODY"}}

Maybe there's a different function I should be using?

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

470 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

470 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

07-02-2019

You should be able to grab the variable value if you do so inside the doPlugins() function. Could you give that a shot and let me know if that works?

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

04-02-2019

I wish to capture the same value being reported in the Experience Cloud Debugger before it is submitted via the s.tl request.

2019-02-04_10-49-51.jpg

Avatar

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
pabloc82923542
Level 6

11-01-2019

Can you expand on what it is you are trying to accomplish?

What is the region data going to help you with?