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

Set profile script to a javascript variable in offer code

Avatar

Avatar
Validate 1
Level 1
chrisludwig87
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisludwig87
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Applaud 5
Affirm 1
View profile
chrisludwig87
Level 1

08-09-2017

Hi, hope someone can haelp me out on my purpose.

We're using the category affinity and I've written a profile script called topCategory using "return user.categoryAffinities[0];". Now I'd like to show a dynamic popup which shows an image. The URL of the image contains the value that is stored in topCategory. So I need to store the value of my profile script in a javascript variable to place it into the image-URL.

Is there a solution existing for this case?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 250
Employee
Amelia_Waliany
Employee

Likes

191 likes

Total Posts

452 posts

Correct Reply

73 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Validate 250
Employee
Amelia_Waliany
Employee

Likes

191 likes

Total Posts

452 posts

Correct Reply

73 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile
Amelia_Waliany
Employee

31-10-2017

Hi there and thanks so much for your question! You can write out the value of a Profile Script in the Offer Code - read more about how to do this in the Target Documentation article on How to Pass Dynamic Data into Offers.

Additionally, feel free to check out the article on Dynamic Values in Targets and Profiles and another on user.categoryAffinities Scripts -- they are both related to your question and may also be helpful.

Let us know here if you have any other related questions/ comments.

Answers (0)