Example

  • mboxCreate("landingpage", "profile.keyword=World Cup");

  • HTML Offer code: Get your ${profile.keyword} information here!

  • Visitor sees: Get your World Cup information here!

The following values can be “token replaced”:

ValueExamples
In-mbox profile parameters${profile.age}
Script profile parameters${user.lifetimeSpend}
Mbox parameters${mbox.favoriteColor}
Campaign information${campaign.name}, ${campaign.recipe.name}, ${campaign.id}, ${campaign.recipe.id}, and ${campaign.recipe.trafficType}
Unique visitor id${user.pcId}
Unique session id${user.sessionId}
Visitor’s first session (true or false)${user.isFirstSession}
Past behavior${user.endpoint.lastPurchasedEntity}, ${user.endpoint.lastViewedEntity}, ${user.endpoint.mostViewedEntity}, ${user.endpoint.categoryAffinity}

Log information in the console for debugging purposes, such as ${campaign.name}, ${campaign.id}, ${campaign.recipe.name}, ${campaign.recipe.id}, ${offer.name}, ${offer.id}, ${campaign.name}

For Recommendations designs, see additional examples in Design Overview.

Implementation

For profile parameters passed into an mbox, use the syntax:

${profile.parameter}

For profile parameters created in a profile script, use the syntax:

${user.parameter}

When using dynamic attributes in a Recommendations design, you must insert a backslash ( \ ) before the dollar sign ( $ ) for the dynamic value to render properly:

\${user.endpoint.lastViewedEntity}

These variables are replaced with the value on the server side, so no quotes or other JavaScript is required for the proper display.

Default values can also be specified for values you want to expose to offers. The syntax is like this:

${user.testAttribute default="All Items!"}

When testAttribute doesn’t exist or is blank, “All Items!” is written out. If an empty attribute value is valid, and you want to write it out instead of showing the default, you can use:

${user.testAttribute default="All Items!" show_blank="true"}

You can also escape and unescape values to be displayed. If your value has an apostrophe, for example, you can escape the value so it does not break the JavaScript on the page. (Offers are written in JavaScript, so a single apostrophe can be confused for a quote.) For example:

${user.encodedValue encode="unescape"}

${user.unencodedValue encode="escape"}

For offer parameters (offer.name, offer.id) used in an offer’s content:

If that offer is one of several offers set on an experience, the value of the last added offer populates the parameter’s value. Meaning, these parameters are evaluated on the experience level.

Previous pageSearch and filter content
Next pageAEM Experience and Content Fragments

Target


Adobe Target Maturity Webinar Series

Adobe Customer Success Webinars

Tuesday, Feb 4, 4:00 PM UTC

Adobe Target innovations, including GenAI, and best practices on AI-powered personalization and experimentation at scale.

Register