In docs referencing Target profile parameters, I see two different ways of interacting with Target profile.
user.THING and profile.THING
What's the difference and when do you use one vs. the other?
References profile.get() and user.get()
Code example here:
https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/profile-parameters.h...
Uses both "user." and "profile."
Thanks
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
It looks like when you Pass information into Target -- for example, using adobe.target.trackEvent or mboxCreate as seen here
adobe.target.trackEvent({
"mbox": "clicked-cta",
"params": {
"param1": "value1"
}
});
// source: https://experienceleague.adobe.com/docs/target-dev/developer/client-side/at-js-implementation/functions-overview/adobe-target-trackevent.html?lang=en
or here
mboxCreate("landingpage", "profile.keyword=World Cup");
// source: https://experienceleague.adobe.com/docs/target/using/experiences/offers/passing-profile-attributes-to-the-html-offer.html?lang=en
-- you use profile. syntax to retrieve this data in HTML (for dynamic content) like this
<h1>Get your ${profile.keyword} information here!</h1>
<p>The value ${profile.param1} was passed in.</p>
or retrieve it in a profile script like this
let example1 = profile.get("param1");
let example2 = profile.get("keyword");
Whereas, user. syntax is used to reference variables created inside of the profile script.
From the documentation, it says this,
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}
Also see this for profile attributes for more on user. syntax https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/profile-parameters.h...
Views
Like
Replies