Set profile script to a javascript variable in offer code | Community
Skip to main content
chrisludwig87
Level 2
September 8, 2017
Solved

Set profile script to a javascript variable in offer code

  • September 8, 2017
  • 1 reply
  • 1926 views

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?

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 Amelia_Waliany

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.

1 reply

Amelia_Waliany
Adobe Employee
Amelia_WalianyAdobe EmployeeAccepted solution
Adobe Employee
October 31, 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.