Depending on your implementation of Target you can create a JavaScript function to send data to be processed in profile scripts.
function targetPageParams() {
That function returns URL style parameters that will be automatically added to the parameters that are already sent (Eg. screenWidth, screenHeight, colorDepth etc.) to the Adobe cloud.
Eg. &pr.channel=education&pr.level=university
I have name spaced the parameters so I don't get clashes with whatever Adobe sends.
The profile scripts are short JavaScript programs that should return strings or numbers which then Audiences can use to determine if the customer belongs.
Eg.
var testChan = mbox.param('pr.channel');
var testLevel = mbox.param('pr.level');
if (testChan) {
if (testChan === 'education') {
if (testLevel) {
if (testLevel === 'high') {
return 'highschool';
} else if (testLevel === 'university') {
return 'university';
} else {
return 'education';
}
} else {
return 'education';
}
} else {
return 'unknown';
}