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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Using profile Geo-location

Dave_hamel1
Level 4
Level 4

Is there a way to push profile.geolocation.country in my mbox response? I was looking at profile scripts but I can't seem to access the DOM through it.  I know I can create experienced based on country, but I would like to leverage that information for other purposes.

Thanks,

7 Replies
jrohit
Employee
Employee

Hi Dave,

Response tokens help you to expose geo information(inbuilt within response tokens) on the page. It's a simple toggle under setup. You can also expose Profile scripts using response tokens. You can find more information on this topic at the below link:

Response Tokens

~Rohit

Dave_hamel1
Level 4
Level 4

Hi Rohit,  Thanks for the response.  I was able to turn them on (easy enough) but I am unclear how I access the information.  I have the latest experience cloud debugger.  Basically I am trying to create a console.log that says "You are in" +<country>.  I know this is probably basic but for the life of me I can't seem to figure it out.

Dave_hamel1
Level 4
Level 4

I made progress and got this to output.  But I am not sure what the name of the object is to grab the value of geo.country, suggestions?response.tokens.png

Shruthi_N
Employee
Employee

You might have to use at.js custom events to listen for the mbox response and read the response tokens.

jrohit
Employee
Employee

Hi Daniel,

You need to enable Response Tokens in Target to get this response in network tab from Target.

~Rohit

danieli73027437
Level 2
Level 2

I've done that, basically I want to be able to get the value of the experience.name response token, and be able to use it (assign it to a variable). How would I do that?