Render Adobe Target Visual Experience Composer (VEC) activities
Target activities are set up using either the Visual Experience Composer (VEC) or the form-based composer. The Platform Web SDK can retrieve and apply VEC-based activities to the page just like at.js. For this part of the migration, you will:
- Install the Visual Editing Helper browser extension
- Execute a
sendEvent
call with the Platform Web SDK to request activities. - Update any references from your at.js implementation that use
getOffers()
to execute a TargetpageLoad
request.
Visual Editing Helper browser extension
The Adobe Experience Cloud Visual Editing Helper browser extension for Google Chrome lets you load websites reliably within the Adobe Target Visual Experience Composer (VEC) to rapidly author and QA web experiences.
The Visual Editing Helper browser extension works with web sites that use at.js or Platform Web SDK.
Obtain and install the Visual Editing Helper
-
Navigate to the Adobe Experience Cloud Visual Editing Helper browser extension in the Chrome Web Store.
-
Click Add to Chrome > Add Extension.
-
Open the VEC in Target.
-
To use the extension, click the Visual Editing Helper browser extension icon
img-md modal-image in your Chrome browser’s toolbar while in the VEC or QA Mode.
The Visual Editing Helper is automatically enabled when a website is opened in the Target VEC to power authoring. The extension doesn’t have any conditional settings. The extension handles all the settings automatically, including SameSite cookies settings.
Refer to the dedicated documentation for more information about the Visual Editing Helper extension and troubleshooting the Visual Experience Composer.
Request and apply content automatically
After the Platform Web SDK is configured on the page, you can request content from Target. Unlike at.js which can be configured to automatically request content when the library loads, the Platform Web SDK requires you to explicitly execute a command.
If your at.js implementation has the pageLoadEnabled
setting set to true
which enables automatic rendering of VEC-based activities, then you would execute the following sendEvent
command with the Platform Web SDK:
code language-javascript |
---|
|
In tags, use the Send event action type with the Render visual personalization decisions option selected:
img-md |
---|
modal-image |
Request and apply content on demand
Some Target implementations require some custom processing of VEC offers before applying them to the page. Or, they request multiple locations in a single call. In an at.js implementation, this can be done by setting pageLoadEnabled
to false
and using the getOffers()
function to execute a pageLoad
request.
getOffers()
and applyOffers()
to manually render VEC-based activitiescode language-javascript |
---|
|
The Platform Web SDK does not have a specific pageLoad
event. All requests for Target content are controlled with the decisionScopes
option with the sendEvent
command. The __view__
scope serves the purpose of the pageLoad
request.
sendEvent
approach:- Execute a
sendEvent
command which includes the__view__
decision scope - Apply the returned content to the page with the
applyPropositions
command - Execute a
sendEvent
command with thedecisioning.propositionDisplay
event type and proposition details to increment an impression
code language-javascript |
---|
|
getOffers()
function to manually execute a Target pageLoad
request without using applyOffers()
to apply the content to the page.The Platform Web SDK offers developers a great deal of flexibility with requesting and rendering content. Refer to the dedicated documentation about rendering personalized content for additional options and details.
Implementation example
The foundational Platform Web SDK implementation is now complete.
JavaScript example with automatic Target content rendering:
code language-html |
---|
|
Tags example page with automatic Target content rendering:
code language-html |
---|
|
In tags, add the Adobe Experience Platform Web SDK extension:
img-md |
---|
modal-image |
Add the desired configurations:\
img-md |
---|
modal-image |
Create a rule with a Send event action and Render visual personalization decisions selected:\
img-md |
---|
modal-image |
Next, learn how to request and render form-based Target activities.