programatically adding profile properties to user profiles from the internets | Community
Skip to main content
Level 3
February 13, 2025
Solved

programatically adding profile properties to user profiles from the internets

  • February 13, 2025
  • 1 reply
  • 902 views

is it possible to programatically add profile properties to a user profile from web ?   I can't find anything on if this is possible or how to do it.  I'm trying to make a call from a page on my site that would add a user properties (user.someProp) to the visitor of the site so I can use it in a Profile Script for audience segmentations.

Best answer by Vaibhav_Mathur

Yes @rjbu , 

 

These parameters can be fetched in profile script using user.get('UserGroup'). 

 

And if you want to create an audience for these parameters, you can directly create an audience in adobe target without having the need of profile script. 

In audience, you can create the following rule :

visitor profile -> UserGroup equals 'newUser'. 

 

Hope it helps. 

 

Best regards, 

Vaibhav Mathur

1 reply

Vaibhav_Mathur
Community Advisor
Community Advisor
February 13, 2025

Hi @rjbu , 

 

You can pass profile attributes in a webpage, just like you pass normal mbox/page parameters. 

For example, You can use the below code for passing a profile parameter let's say UserGroup : 

 

function targetPageParams(){
return "profile.UserGroup=newUser";
}

 

You can also pass the profile parameters in a JSON format as given below : 

 

targetPageParams = function() {
return {
"profile": {
"UserGroup": "NewUsers"
}
};
};

 

Document for reference : https://experienceleague.adobe.com/en/docs/target-dev/developer/client-side/global-mbox/pass-parameters-to-global-mbox#_blank

 

Hope it helps, 

 

Best Regards, 

Vaibhav Mathur

RJBuAuthor
Level 3
February 13, 2025

would these properties then be accessible in the profile scripts (via UserGroup=newUser in your example) ?

Vaibhav_Mathur
Community Advisor
Vaibhav_MathurCommunity AdvisorAccepted solution
Community Advisor
February 13, 2025

Yes @rjbu , 

 

These parameters can be fetched in profile script using user.get('UserGroup'). 

 

And if you want to create an audience for these parameters, you can directly create an audience in adobe target without having the need of profile script. 

In audience, you can create the following rule :

visitor profile -> UserGroup equals 'newUser'. 

 

Hope it helps. 

 

Best regards, 

Vaibhav Mathur