If you want to capture the campaign information for a specific campaign, you can do so by adding a website data element to the survey. If AB Tasty is active on a page, then there will also be an object available on the page called ABTasty. An overview of all campaign ID’s can be found by accessing ABTasty.results
This is an object that only contains campaigns that are currently running on your AB Tasty account. If you are looking for data for a specific campaign you can use the campaign ID to only add data from that campaign to the feedback. This is done by adding the key to the variable we want to record, like so: ABTasty.results
807182 Is the ID used for this example, be sure to replace it with the campaign ID that you are after.
A single campaign will contain the following keys name, status, targetings, type, variantionID, and variationName:
To further dig down to just the variantionID, add that as well in the website data element as a JS var:
If this specific campaign is not loaded on the page where the feedback is being sent from, then no variationID will be present and nothing will be added to the feedback as a result.
The website data element in the survey builder will look like this: