Using Personalization with a non-Drupal website

You can install Personalization on any website, regardless of what content management service your website uses, by configuring several environment variables, and including a link to the lift.js script or by using metatags.


As you prepare to use Personalization with your website, ensure you plan for the following requirements:

Component Requirement
Keys After purchasing Personalization, Acquia will email you a group of keys required to connect to the Personalization service.
Personalization account Acquia creates an account for you as part of your subscription.

Installing Personalization

The JavaScript code or Metatag information in the following links must call the page’s <head> section as soon as possible, enabling Personalization to make the appropriate calls during the rendering process.

To use Personalization on your non-Drupal website:

  1. Download the appropriate script for your use case:
  2. In Personalization:
    1. Create a new customer site for each website you plan to install Personalization on.
    2. Retrieve your customer details, which contain the account properties needed to install Personalization.
  3. On your website:
    1. Copy the code for JavaScript or Metatags to the HTML <head> of your website, or to Google Tag Manager.
    2. Update the ACCOUNT, site_id, and PAGE-SPECIFIC variables in the code for your customer values, based on the Replacing variables table.
  4. Test your configuration:
    1. Open your website as an anonymous user, or in an incognito window.
    2. In your original window, view the People tab in Personalization. You will see a Tracking ID associated with your anonymous visit.
    3. Click the Tracking ID, and select from the Touches list. Following the Touches list, the Events view will populate with your page-specific events.

After the code is in place on your website, you can get started with building experiences and creating campaigns. Personalization 4 uses the Manual Slot method of embedding slots on your non-Drupal website. For more information, see creating slots.

Replacing variables

The following table lists the variables you need to replace as part of your Personalization installation.

Variable name Example value Definition
account_id   Your Personalization account id (Required)
site_id   Personalization site ID to use for segments and capture data (Required)
liftAssetsURL Where to load more administrative assets
liftDecisionAPIURL The base URL of the decision API
cdfVersion 2 Alerts Personalization about which the version of Content Hub is in use. You must set this value to 2 unless you are using Content Hub 1. For Content Hub 1, this value is set as 1
profile { UDFieldName: UDFFieldValue } A collection of capture values sent either from the captureView parameters list or from the data warehouse UDF fields, which override any values set in the website’s <meta> tags
context_language en The current language of the content on the page. Uses 2-letter ISO 639-1 language codes. For more information, see list of ISO 639-1 codes.