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

SOLVED

Difference between "profile." and "user."?

J2_2
Level 2
Level 2

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?

Note: https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/profile-parameters.h...

 

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

1 Accepted Solution
Andrey_Osadchuk
Correct answer by
Community Advisor
Community Advisor
  1. When you want to set a persistent attribute in a JS implementation, you set a profile.SOMETHING parameter.
  2. AT creates some profile parameters automatically too. For example, profile.sessionCount, profile.geolocation.country.
  3. Each profile script becomes user.PROFILESCRIPTNAME. When you want to reference a profile script in another profile script or in an experience as a dynamic placeholder, you can do it via user.PROFILESCRIPTNAME
 

View solution in original post

3 Replies
LordOfTheRings
Level 6
Level 6

Hi @J2_2 profile.THING is profile parameter of an user profile . user.THING is the profile script

J2_2
Level 2
Level 2
Thanks for the answer - what is the difference in practical terms? It looks as though they are interchangeable how they are used, and both can save to and pull from, the Visitor Profile, when fired "on the page".
Andrey_Osadchuk
Correct answer by
Community Advisor
Community Advisor
  1. When you want to set a persistent attribute in a JS implementation, you set a profile.SOMETHING parameter.
  2. AT creates some profile parameters automatically too. For example, profile.sessionCount, profile.geolocation.country.
  3. Each profile script becomes user.PROFILESCRIPTNAME. When you want to reference a profile script in another profile script or in an experience as a dynamic placeholder, you can do it via user.PROFILESCRIPTNAME
 

View solution in original post