On this page: Learn the steps to implement Analytics for Target (A4T) with the Adobe Experience Platform Web SDK or with at.js.
style
shade-box
Implementing Adobe Analytics as the reporting source for Adobe Target (A4T) requires several steps. The steps depend on whether A4T is implemented with the Adobe Experience Platform Web SDK or with at.js.
Implementation steps for the Adobe Experience Platform Web SDK platform
The following steps deploy the integration to a site that uses the Platform Web SDK.
Set up the user permissions. The user account requirements must be met before an activity based on Analytics can be created in Target. See User permission requirements.
Create an Edge configuration in Adobe Experience Platform using the edge configuration tool. For the configuration, see Create and configure datastreams.
Install and configure the Platform Web SDK on the site pages. The SDK delivers Target experiences and applies Analytics for tracking and analysis purposes.
Enable the reporting options. In the Target UI, click Administration > Reporting, then choose either Select per activity or Adobe Analytics.
Select per activity allows a choice between Target and Analytics when each activity is created.
Adobe Analytics sets Analytics as the reporting source for all activities that are created.
Implementation steps for at.js section_73961BAD5BB4430A95E073DE5C026277
The following steps deploy the integration to a site that uses at.js. The required library versions are listed in Implementation requirements.
Request provisioning for Analytics and Target. After Analytics is implemented as the reporting source for Target, the account must be provisioned. Use this form to request provisioning.
Set up the user permissions. The user account requirements must be met before an Analytics-based activity can be created in Target. See User permission requirements.
Implement the Experience Cloud Visitor ID service, which identifies users across Adobe Experience Cloud solutions. Implement or migrate to the required version of the Experience Cloud Visitor ID.
Download and update at.js. Implement or migrate to the required version of at.js using the production account. No modifications are required in the code.
Host at.js. If at.js was previously deployed, replace the existing file with the updated version. Otherwise, host the file together with the Visitor ID service and AppMeasurement for JavaScript files. These files must be hosted on a web server that is accessible to all pages of the site. The path to these files is needed in the next step.
Reference at.js on all site pages. Include at.js below VisitorAPI.js by adding the following line of code in the tag on each page:
VisitorAPI.js must be loaded before at.js. When an existing at.js file is updated, verify the load order.
By default, the SDID that is passed from the page stitches the Target and Analytics requests together automatically in the backend. How and when analytics data related to Target is sent to Analytics for reporting can also be controlled. To opt out of the default stitching, use one of the following approaches. Versions of at.js below 2.1 do not support them.
accordion
Send the payload for every request (global setting)
Set analyticsLogging = client_side via window.targetGlobalSettings.
This setup has a global effect: every call made by at.js sends analyticsLogging: “client_side” within the Target requests, and an analytics payload is returned for every request. The returned payload has the following format:
The payload can then be forwarded to Analytics via the Data Insertion API. For Auto-Allocate and Auto-Target activities, the sessionId must also be forwarded. For more information, see Analytics for Target (A4T) reporting in the Adobe Target SDKs guide.
accordion
Send the payload for a single call (on demand)
If a global setting is not desired and a more on-demand approach is preferable, use the at.js function getOffers() and pass analyticsLogging: “client_side”. The analytics payload is returned for this call only, and the Target backend does not forward the payload to Analytics. With this approach, the payload is returned only when it is specified, instead of by default for every at.js Target request.
The payload can then be forwarded to Analytics via the Data Insertion API.
Validate the implementation. After the JavaScript libraries are updated, load the pages to confirm that the mboxMCSDID parameter values in Target calls match the sdid parameter value in the Analytics page-view call. Confirming the match is especially important in Single Page Applications (SPAs), where the order of calls is not always predictable.
note
NOTE
The matching of these values is required for A4T to function correctly.
(Optional) Remove the previous integration code. Adobe recommends removing the previous integration to simplify the implementation and to eliminate the need to sort out discrepancies between the systems. Any code deployed for a previous SC to T&T integration can be removed, including mboxLoadSCPlugin.
Enable the reporting options. In the Target UI, click Administration > Reporting, then choose either Select per activity or Adobe Analytics.
Select per activity allows a choice between Target and Analytics when each activity is created.
Adobe Analytics sets Analytics as the reporting source for all activities that are created.
AI Knowledge Reference
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
TL;DR: This page lists the steps to implement Adobe Analytics as the reporting source for Adobe Target (A4T), with one set of steps for an Adobe Experience Platform Web SDK implementation and one for an at.js implementation.
Intents:
Identify the implementation steps for A4T with the Platform Web SDK.
Identify the implementation steps for A4T with at.js.
Choose between Select per activity and Adobe Analytics as the reporting source option in Target.
Return the analytics payload in at.js requests with analyticsLogging set to client_side, either globally or for a single getOffers() call, so that it can be forwarded to Analytics via the Data Insertion API.
Validate the implementation by comparing the mboxMCSDID and sdid parameter values.
Remove the code of a previous integration.
Glossary:
A4T(product-specific): Adobe Analytics as the reporting source for Adobe Target.
Select per activity(product-specific): Option that lets you choose between Target and Analytics when creating each activity.
Adobe Analytics(product-specific): Option that sets Analytics as the reporting source for all activities that you create.
SDID(product-specific): Value passed from the page that Target and Analytics use by default to stitch the Target and Analytics requests together on the backend automatically.
analyticsLogging: "client_side"(product-specific): Setting, applied through window.targetGlobalSettings or in a getOffers() call, that returns an analytics payload in the Target request response instead of the default automatic stitching through the SDID.
Analytics payload(product-specific): Object returned with pe and tnta values when analyticsLogging is client_side; it can then be forwarded to Analytics via the Data Insertion API.
mboxMCSDID(product-specific): Parameter in Target calls whose value must match the sdid parameter value in the Analytics page-view call.
Guardrails:
The analyticsLogging = client_side setting through window.targetGlobalSettings is not supported by at.js versions below 2.1.
When analyticsLogging is set globally through window.targetGlobalSettings, every call made by at.js sends analyticsLogging: "client_side" within the Target requests and an analytics payload is returned for every request.
When analyticsLogging: "client_side" is passed to getOffers(), the analytics payload is returned for that call only, and the Target backend does not forward the payload to Analytics.
For Auto-Allocate and Auto-Target activities, you must also forward the sessionId when you forward the payload to Analytics.
VisitorAPI.js must be loaded before at.js. If you are updating an existing at.js file, make sure that you verify the load order.
The at.js, Visitor ID service and AppMeasurement for JavaScript files must be hosted on a web server that is accessible to all pages on your site.
The mboxMCSDID values in Target calls must match the sdid parameter value in the Analytics page-view call; the matching is required for A4T to function correctly.
Prerequisites and permissions:
You must be provisioned for Analytics and Target (Step 1 of both the Platform Web SDK and the at.js implementation).
User account requirements must be met before you can create an activity based on Analytics in Target.
at.js implementation: implement or migrate to the required versions of the Experience Cloud Visitor ID, appMeasurement.js and at.js, as described under “Implementation Requirements” in the Before you implement page.
Terminology:
Canonical name: Analytics for Target (A4T) — Acronym: A4T — variants: Adobe Analytics as the reporting source for Adobe Target, Analytics-based activity (for an activity that uses Analytics as the reporting source).
Canonical name: Adobe Experience Platform Web SDK — variants: Platform Web SDK.
Canonical name: Adobe Target — Acronym: AT — variants: Target.
Variants of the Experience Cloud Visitor ID: visitor ID service, Experience Cloud ID Service.
Do not confuse: “Select per activity” ≠ “Adobe Analytics” (the first lets you choose the reporting source for each activity; the second sets Analytics as the reporting source for all activities that you create).
FAQ:
Does the implementation differ between the Platform Web SDK and at.js? Yes. The process varies depending on whether you implement A4T with the Adobe Experience Platform Web SDK or with at.js, and the page has one set of steps for each.
What is the default way Target and Analytics are stitched together with at.js? The default is to use the SDID that is passed from the page to stitch the Target and Analytics requests together on the backend automatically.
How do I control how and when analytics data related to Target is sent to Analytics with at.js? Set analyticsLogging = client_side via window.targetGlobalSettings for a global effect, or pass analyticsLogging: "client_side" in the at.js getOffers() function for an on-demand approach. The payload can then be forwarded to Analytics via the Data Insertion API.
What does Select per activity do compared with Adobe Analytics?Select per activity lets you choose between Target and Analytics when creating each activity. Adobe Analytics sets Analytics as the reporting source for all activities that you create.
How do I know the implementation works? Load your pages after you have updated the JavaScript libraries and confirm that the mboxMCSDID parameter values in Target calls match the sdid parameter value in the Analytics page-view call. It is especially important in Single Page Applications (SPAs), where the order of calls is not always predictable.
Should I remove a previous integration? Adobe recommends that you remove the previous integration to simplify your implementation and eliminate the need to sort out discrepancies between the systems.
Examples:
Global setting in at.js: window.targetGlobalSettings = { analyticsLogging: "client_side" }; returns an analytics payload such as "pe": "tnt" and "tnta": "167169:0:0|0|100,167169:0:0|2|100,167169:0:0|1|100".
On-demand setting in at.js: adobe.target.getOffers() with experienceCloud.analytics.logging set to "client_side" and a prefetch of the mbox a1-serverside-xt returns a response from which you can extract the analytics payload.
Best practices:
Recommendation: remove the code you deployed for a previous SC to T&T integration, including mboxLoadSCPlugin, to simplify your implementation (optional step).
Related pages:
To check the user account requirements before creating an Analytics-based activity in Target: User permission requirements (c-integrating-target-with-mac/a4t/account-reqs.md)
To find the required versions of the Visitor ID service, AppMeasurement and at.js (“Implementation Requirements”): Before you implement (c-integrating-target-with-mac/a4t/before-implement.md)
Personas:
admin: Can choose either Select per activity or Adobe Analytics as the option for using A4T. Select per activity lets you choose between Target and Analytics when creating each activity. Adobe Analytics sets Analytics as the reporting source for all activities that you create. Where: “Step 5: Enable the options for using A4T”.
developer: Can set analyticsLogging = client_side via window.targetGlobalSettings, or pass analyticsLogging: “client_side” to the at.js getOffers() function, so that an analytics payload with pe and tnta values is returned. Can forward the payload to Analytics via the Data Insertion API. For Auto-Allocate and Auto-Target activities, the page states that you must also forward the sessionId, and that versions of at.js below 2.1 do not support the global setting. Where: “Step 7: Reference at.js on all site pages”.
Onboarding:
Level: Intermediate, Experienced
First minimal step: Set up the user permissions so that the user account requirements are met before you create an activity based on Analytics in Target.
Success check: The mboxMCSDID parameter values in Target calls match the sdid parameter value in the Analytics page-view call.
Previous: Check user account requirements before creating an Analytics-based activity: User permission requirements (c-integrating-target-with-mac/a4t/account-reqs.md); Find the required versions of Visitor ID service, AppMeasurement and at.js: Before you implement (c-integrating-target-with-mac/a4t/before-implement.md)