Personalization

Experience Builder methods

End-of-sale notice!

Acquia announces the end-of-sale for Acquia Personalization effective July 1, 2024. Customers with active service contracts will continue to receive support. If you are interested in experimentation and optimization, contact Acquia Sales Team to get information about Acquia Convert powered by VWO.

End-of-life notice!

Acquia announces the end-of-life for the acquia_lift module effective December 31, 2025. Acquia recommends you to update your application to the current version of Acquia Personalization. For any assistance related to migration, contact Acquia Support.

The Personalization JavaScript API enables manipulation of Experience Builder through the window.AcquiaLiftPublicApi global namespace. This page describes the methods that are available for use, by function.

Handling the Experience Builder sidebar

Use the following methods to handle the Experience Builder sidebar:

MethodDescription
activateActivates Experience Builder for the user. If the user is currently signed in, using this method opens the sidebar—if not, it will trigger an authentication request.
deactivateDeactivates the Experience Builder, which closes the sidebar and signs out the current user. It will leave the markup for the Experience Builder in the DOM for reactivation.
removePerforms the deactivate process, and then removes the Experience Builder markup from the DOM.

Managing displayed data

Use the following methods to handle the information displayed by Experience Builder:

MethodDescription
refreshRefreshes the data displayed in an open instance of the Experience Builder. This can be helpful when using a custom application that modifies slots, or segments outside of the Experience Builder, and you want the Experience Builder to recognize the changes without forcing a refresh of the entire page. Optionally, you can specify an array of the types of data to refresh. The valid types are slot, rule, and segment.

Examples

To refresh all of the Experience Builder-related data on a page, use the following code:

window.AcquiaLiftPublicApi.refresh();

To trigger a refresh of the slot data, use code similar to the following:

window.AcquiaLiftPublicApi.refresh(['slot']);

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Acquia Help

Filter by product:

Personalization common questions