Follow the steps in the Initialize SDK diagram to ensure that all necessary tasks needed to load the Adobe Target at.js JavaScript library are executed in the correct sequence.
Click the images in this topic to expand to full screen.
For multi-page applications, this flow happens every time the page reloads, or the visitor navigates to a new page on the website.
The step numbers in the following illustration correspond to the sections below. The step numbers are in no particular order and do not reflect the order of steps taken in the Target UI while creating the activity.
Click the following links to navigate to the desired sections:
This step helps ensure that the VisitorAPI.js
library is loaded, configured, and initialized correctly.
Prerequisites
VisitorAPI.js
file. You should already have this file if you have Adobe Analytics implemented. This file can also be added through the Adobe Experience Platform tags extension or can be downloaded from the Adobe Analytics Code Manager.Configure and refer VisitorAPI.js
For more information, see Implement the Experience Cloud Service for Target.
Readings
Actions
VisitorAPI.js
file on your webpages.VisitorAPI.js
file is loaded, use the Visitor.getInstance
method to initialize using the necessary configurations you need.Return to the diagram at the top of this page.
This step helps ensure that your visitors’ known IDs (CRM ID, User ID, and so forth) are tied to the anonymous ID of Adobe for cross-device personalization.
Prerequisites
Set Customer ID
For more information, see setCustomerIDs.
Readings
Actions
visitor.setCustomerIDs
to set the visitor known ID.Return to the diagram at the top of this page.
This step enables at.js to fetch all the experiences that must be rendered on the page while loading the at.js JavaScript library file.
Prerequisites
Configure automatic page load request
For more information, see targetGlobalSettings().
Readings
Learn about the pageLoadEnabled
setting in targetGlobalSettings().
Actions
window.targetGlobalSettings
object to enable automatic page-load requests.Return to the diagram at the top of this page.
This step helps ensure that there is no page flicker when delivering experiences.
Prerequisites
Configure flicker handling
For more information, see targetGlobalSettings().
Setting bodyHidingEnabled
to true
hides the entire page body while the page-load request is in progress. If you have not enabled the automatic page-load request for any reason (data later not ready, for example), it is best to set this setting to false
.
If you have disabled bodyHidingEnabled
because you do not want to fire APLR and want to fire the page request later, or you do not need flicker handling, you must implement your own flicker handling. You can handle flicker two ways: hiding the sections under test or by showing a throbber on the sections under test.
Readings
Actions
window.targetGlobalSettings
object to set bodyHiddenStyle
and bodyHidingEnabled
.Return to the diagram at the top of this page.
This step helps ensure that all the data that must be sent to Target is set.
Prerequisites
entity.id
to capture data for recently viewed criteria and items based on criteria based on last viewed product.entity.id
to capture data for popularity criteria based on favorite category.Map data to Target
For more information, see targetPageParams().
Readings
Actions
targetPageParams()
function to set all the required data that must be sent to Target.Return to the diagram at the top of this page.
Add promoted items and control their placement in your Target Recommendations designs.
Available options
Entity parameters required
Return to the diagram at the top of this page.
Make recommendations based on the user’s cart contents.
Available criteria
Entity parameters required
Readings
Return to the diagram at the top of this page.
Make recommendations based on the overall popularity of an item across your site or based on the popularity of items within a user’s favorite or most-viewed category, brand, genre, and so forth.
Available criteria
Entity parameters required
entity.categoryId
or the item attribute for popularity based if the criteria is based on the current item or the item attribute.Readings
Return to the diagram at the top of this page.
Make recommendations based on finding similar items to an item that the user is viewing or has recently viewed.
Available criteria
Entity parameters required
entity.id
or any profile attribute used as a keyReadings
Return to the diagram at the top of this page.
Make recommendations based on the user’s behavior.
Available criteria
Entity parameters required
entity.id
Readings
Return to the diagram at the top of this page.
Make recommendations based on a custom file that you upload.
Available criteria
Entity parameters required
entity.id
or the attribute used as a key for the custom algorithm
Readings
Return to the diagram at the top of this page.
Return to the diagram at the top of this page.
Pass entity IDs for entities that you want to exclude from your recommendations. For example, you can exclude items that are already in the shopping cart.
Return to the diagram at the top of this page.
entity.event.detailsOnly=true
parameterUse entity attributes to pass product or content information to Target Recommendations.
Return to the diagram at the top of this page.
This step ensures that all the data that must be sent to Target is set.
Prerequisites
Set up data providers
For more information, see Data providers.
Readings
Actions
Use the targetPageParams()
function to set all the required data that must be sent to Target.
Return to the diagram at the top of this page.
This step ensures that the at.js JavaScript library is loaded and initialized.
Prerequisites
at.js 2.*x*
JavaScript library file.Readings
Actions
Embed the at.js file on all your webpages where experimentation, optimization, personalization, and data collection must happen.
Return to the diagram at the top of this page.
Proceed to Step 2: Configure data collection.