Hi there,
Plug-ins are snippets of code that you want to run alongside any and all tests or with mboxes for that matter. They are independent of all test which is the key benefit. While offers are used to generate a plug-in it is best to think of offers solely as code that you would use in a campaign.
Debugging plugins is accomplished much the same way you would debug an offer (content used in a test). You can simply identify any javascript errors and address as needed. If you look at the mbox response back to the page via a network sniffer, you can see your plug-in code respond to the page.
As for the profiles, within the Adobe Target interface, profiles are differentiated from profiles passed to an mbox with the syntax user. vs. via the mbox where they are called profile.. WIthin the user. or the profile setting section within the interface, you can use any and all information the mbox sees to set a profile.
Here are two examples of scripts that you can use within the interface:
1. This first one sets a profile when someone makes a purchase or when the orderConfirmPage mbox is seen. It also increments so if someone were to purchase on two separate occasions, you could target and segment them.
if (mbox.name == 'orderConfirmPage') {
return (user.get('purchasefrequency') | 0) + 1;
}
2. This profile puts visitors into buckets based off how much they spent as that value is something that is passed to the thank you mbox. Here you can target or segment high spenders from low spenders.
if (mbox.name == ('orderConfirmPage')) {
var total = mbox.param('orderTotal');
if (total >= 100)
return 'high';
else if (total >=50)
return 'medium';
else if (total >= 25)
return 'low';
else
return 'unknown';
}
I hope this helps.
Brian