I'm using AMPScript in an email to do lookups and decide which content area to include.
Is there any way to know which content area was included for each recipient? Ideally I'd like to pull this info via the REST API.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Yes. Impression Regions will track that information, however there's not a lot of retrievable data available, other than the two canned reports.
The Impression Region name cannot be an AMPScript variable.
I believe support has to enable the canned reports.
If you'd rather have some more flexibility, you can build it yourself using AMPScript variables and the Send Log. Basically, you determine what version of the email the subscriber is getting, set a variable like
@emailCode, and then enable Send Logging on the send. If you have an
emailCode column in your Send Log, then it'll get recorded. Then it's accessible via Query Activity and API. Send Logging has to be enabled by SFMC Support.