Hi @jonathanba1 ,
You correctly mentioned that for frequency capping, you'll need to pass some unique identifier or trigger an mbox impression which can be used in profile script to count/increase the value of number of times the experience is viewed.
In this scenario, while using JSON in your experience, I think it would be better to pass a unique identifier at the point where you are fetching the Adobe target JSON response.
For example, Let's assume you want to fetch the activity JSON in your homepage , once you receive the correct JSON response from the activity , you can trigger the given track event code in your homepage code :
adobe.target.trackEvent({
"mbox": "experience-experience_interaction",
"params": {
"experience_id": "your_experience_identifier"
}
});
And you can create a profile script to check the number of impressions. For example as given in the code below :
// Profile script code for AT.js
// Step 1: get the existing value stored in the profile script
// if the value does not exist, then set the profile-script value to 0
var countat = user.get('your_profile_script_name')||0;
// Step 2: check that this call is result of an interaction with your experiences
// by checking the name of the mbox and mbox=parameter containing experience-identifier
if(mbox.name == "experience_interaction" && mbox.param("experience_id") == "your_experience_identifier") {
// if its an interactiion with your experience then increase the profile-script value by 1
countat = countat + 1;
}
return countat;
You can go through a similar article on frequency capping for reference :
https://dexata.co/art-of-balance-overcoming-marketing-fatigue-using-frequency-capping/
I hope you find it helpful.
Best Regards,
Vaibhav Mathur