Method |
Description |
---|---|
|
Triggers a Decision API call to retrieve decisions, and then broadcast
the customized section of the response data to the webpage.
The function can take a configuration object as an optional argument.
The JavaScript event |
|
Triggers a Decision API call to run personalization for the webpage or
for a list of slots on the webpage. Contained in the
|
You can use personalization code for an entire page, or for specific parts of a page, as shown in the following examples:
Use the following code to personalize an entire page:
window.AcquiaLiftPublicApi.personalize();
To personalize a specific slot or an array of slots, use the following:
window.AcquiaLiftPublicApi.personalize({slots: ['744bffce-66b3-4f4a-8ea9-b481a556c3f8']});
In the previous example, 744bffce-66b3-4f4a-8ea9-b481a556c3f8
is an
example slot ID you want to use. The slot ID is an auto-generated
UUID (Universally Unique Identifier).
To retrieve the decisions of the slots from another URL, and then apply the personalization on the current webpage, use code like the following:
window.AcquiaLiftPublicApi.personalize({url: 'http://mysite.com/another-page'});
To personalize based on a single segment:
window.AcquiaLiftPublicApi.personalize({segments: ['<segment id>']});
Or on multiple segments:
window.AcquiaLiftPublicApi.personalize({segments: ['<segment id>','<segment id2>']});