Category: AB Testing
This integration is only available for Web projects
What to expect
Users can import their Adobe Target test variations and get visual insight as to why a certain test won and how to create even better tests.
What we collect
Dynamic Variables
Key | Value | Data Type |
AB_AT_{Campaign Name} | Experience A | Text |
Limitations
This integration does not support redirect tests due to Adobe not providing a way to retrieve the campaign values after the redirect has occurred.
Implementation
Implementation Steps
- If you’re already creating segments in Adobe Analytics for your different test experiences, then you can use the Adobe Analytics integration to import those segments. Please see the Adobe Analytics integration here.
- You can integrate directly with Adobe Target. This integration adds code to either the main at.js Adobe Target tag or the Adobe Target extension solution or via the Adobe Experience Platform Web SDK. If you are going to use this route then resume below.
Step 1
Please go to the section How to request an integration to see the instructions to enable this integration. You can then return here once completed.
If you have already completed the step above then continue below.
Step 2
You will need to use Response Tokens for this to work.
This logic below will show you how to make use of or re-create the ttMETA object which used to be a plugin built into Adobe but which is now deprecated. However Adobe provided a way to re-create that object using the code we provided below. Please do not use Adobe's code in the document link above, rather use ours below. Note that it is just the name that is the same (ttMETA) but the deployment is not the same as the original plugin.
If you are already using Response Tokens then all you need to add is the code which will re-create the ttMETA object. If you already have code doing that then there is nothing for you to do below.
Note there are 3 solutions below, the 1st is the at.js solution, the 2nd is for the Adobe Target extension solution and the 3rd is for the Adobe Experience Platform Web SDK solution.
If you haven't yet configured the Response Tokens then do the following:
Required Code
/* *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
If you are building your Adobe Target core code from Adobe Target directly then continue below but if you are using Adobe Launch to inject the Adobe Target extension then please skip to the next section for Adobe Launch.
Configure code in Adobe Target
Configuration for the Adobe Target extension solution in Adobe Launch
In Adobe Launch you cannot edit the Adobe Target core code so you need to simply add a new rule called Adobe Target ttMETA Plugin (or whatever you want to call it) and inject it as custom code immediately after the Adobe Target injection rule.
When you create the new rule, set the load order as one number directly after your Adobe Target rule is set. So if Adobe Target rule is set to 49 for example:
Configuration for the Adobe Experience Platform Web SDK extension in Adobe Launch
In Adobe Launch, create a rule with the following settings or edit an existing rule that already contains the required Event known as Adobe Experience Platform Web SDK - Send event complete:
If you don't have such an event in your rules then create it like this:
Choose Adobe Experience Platform Web SDK and then choose Send event complete
In the Actions section of the rule add a new or edit an existing Custom Code container.
Open the editor by clicking the relevant button
Inside the open field paste the following code:
Note that if you already make use of the event.propositions object in your code then simply add the part after the definition of var propositions = event.propositions; and tweak 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
You should now see something like this:
Save that and Keep changes and you should now have something like this as a rule:
Publish those code changes and this will re-create the ttMETA object which our code can collect the Adobe Target test items from.
Verifying it works
You can use the chrome extension to check the results are sent to CS
Forcing the correct background for zoning