With this integration, you can import Adobe Target test variations and get visual insight as to why a certain test won and how to create even better tests.
Before you begin
- This integration is only available for Web projects.
- This integration does not support redirect tests due to Adobe not providing a way to retrieve the campaign values after the redirect has occurred.
- The integration will first need to be enabled by following the steps in our How to request an integration article.
We collect the following data:
Key | Value | Type |
AB_AT_{Campaign Name} | Experience A | Text |
How to connect
There are three methods for connecting Contentsquare with Adobe Target. Follow the relevant section below that applies to your setup but please note that all solutions require enabling Response Tokens.
Activate response tokens
1. Login to Adobe Target.
2. Click Setup, then click Response tokens.
For more details on Response tokens, see Adobe's Response tokens documentation.
3. Toggle on the status for experience.name and activity.name.
Using the at.js solution
Add custom code
1. Copy the following code to recreate the ttMETA object (replacing the deprecated Adobe plugin).
/* *Name: Adobe Target CS Integration *Version: 1.1.1 */ document.addEventListener("at-request-succeeded", function (e) { window.ttMETA = typeof window.ttMETA != "undefined" ? window.ttMETA : []; if (e && e.detail) { const tokens = e.detail.responseTokens; if (tokens) { tokens.forEach(function (token) { window.ttMETA.push({ CampaignName: token["activity.name"], CampaignId: token["activity.id"], RecipeName: token["experience.name"], RecipeId: token["experience.id"], OfferId: token["offer.id"], OfferName: token["offer.name"], }); }); } } }); //Adobe Target CS Integration End
2. In Adobe Target, click Setup, then click Implementation.
3. Identify the Main implementation method you're using on your site, then click Edit for that method.
4. Scroll to the Library Footer text area, then paste the code within that area.
5. Click Save, then download the latest version of at.js.
6. Replace the existing at.js library on your site with the new version.
Using the Adobe Target extension solution in Adobe Launch
1. Open the Rules tab and click Create New Rule.
2. Enter a name for the rule, such as Adobe Target ttMETA Plugin.
3. In the Events section, click Add.
4. In the Extensions dropdown, select the appropriate Extension and the relevant Event Type to trigger this rule.
5. Enter the Order number to be one number directly after your Adobe Target rule is set. For example, if your Adobe Target rule is set to 49, the rule (e.g. Adobe Target ttMETA Plugin) Order number will need to be 50 so it runs immediately after.
6. Paste the following code into the Open Editor section and set the Language as JavaScript and Execute globally.
/* *Name: Adobe Target CS Integration *Version: 1.1.1 */ document.addEventListener("at-request-succeeded", function (e) { window.ttMETA = typeof window.ttMETA != "undefined" ? window.ttMETA : []; if (e && e.detail) { const tokens = e.detail.responseTokens; if (tokens) { tokens.forEach(function (token) { window.ttMETA.push({ CampaignName: token["activity.name"], CampaignId: token["activity.id"], RecipeName: token["experience.name"], RecipeId: token["experience.id"], OfferId: token["offer.id"], OfferName: token["offer.name"], }); }); } } }); //Adobe Target CS Integration End
8. Click Save to store the new rule.
Using the Adobe Experience Platform (AEP) Web SDK Solution
1. Open the Rules tab and click Create New Rule.
You can instead edit an existing rule that already contains the Adobe Experience Platform Web SDK Extension with the Send event complete Event Type.
2. From the Extensions dropdown, select Adobe Experience Platform Web SDK.
3. Set the Event Type to Send event complete.
4. In Action Configuration, add a new or edit an existing Custom Code container.
5. Inside the Open Editor view, paste the following code:
Note that if you already make use of the event.propositions object in your code then add the part after the definition of var propositions = event.propositions; and adjust the for loop and items to have the same object name as you have. If you don't use this then take all the code as is.
/* *Name: Adobe Target CS Integration (AEP version) *Version: 1.0.1 */ var propositions = event.propositions; if (typeof propositions != "undefined") { window.ttMETA = window.ttMETA || []; for (var i = 0; i < propositions.length; i++) { if (propositions[i].items && propositions[i].items[0] && propositions[i].items[0].meta && propositions[i].items[0].meta["activity.name"] && propositions[i].items[0].meta["experience.name"]) { var campaignName = propositions[i].items[0].meta["activity.name"]; var experienceName = propositions[i].items[0].meta["experience.name"]; window.ttMETA.push({ CampaignName: campaignName, RecipeName: experienceName, }); } } } //Adobe Target CS Integration End
6. Click Save and publish the code changes.
This will recreate the ttMETA object which our code can collect the Adobe Target test items from.
FAQs
How do I verify the integration is working correctly?
Using our Tracking Setup Assistant extension for Chrome, you can check which dynamic variables are being tracked. For more details, see our Contentsquare Tracking Setup Assistant article.
How can I force the correct background for zoning?
The QA URL from within Adobe can be used to get the correct background for zoning. To find this URL, follow these steps:
1. Select the test you want the force the background for.