Information for: DEVELOPERS   PARTNERS

Creating slots in Experience Builder

This information applies to Acquia Lift version 3 only.

In Experience Builder you can both track the behavior of your website’s visitors and customize your content to match their interests. You can then test your visitors’ reactions to the customized content to ensure your marketing strategy is working. For more information, see Planning your A/B testing or Experience Builder.

In Acquia Lift, a rule is a group of customized content targeted toward a particular audience, designed to prompt the defined audience to take specific actions on your website.

The first step in creating rules in Experience Builder is defining a slot. A slot is an area on your website you configure to display A/B tests or targeted content. After you create a slot, you can drag and drop content variations into it to create rules.

Refer to the following video tutorials to help you personalize and configure Acquia Lift, by product version:

Creating a slot

To create a slot, complete the following steps:

  1. Sign in to your website as an administrative user with content personalization management rights.

  2. Activate the Experience Builder sidebar.

  3. On the Create tab, click the Slots tab. Experience Builder displays a list of available slots on the webpage. If there are no available slots, Experience Builder displays the message There are no slots on this page. Add a slot to begin customizing your website's experience.

  4. To create a new slot, click Create new slot. Experience Builder displays a dialog box.

  5. In the Slot Name field, enter a name describing the slot’s purpose (for example, Front Page Banner).

  6. In the Slot Pages field, enter the paths for the webpages where you want the slot to display, one webpage per line. Experience Builder displays the domain on which you are running Profile Manager above the Slot Pages field. By default, the field displays the path of the webpage you are visiting.

    Note

    If you try to enter a name for a slot matching an existing slot name anywhere on the website (not only on the webpage), the system will display an error message.

  7. Click Create Slot. Experience Builder displays an Embed Code dialog box containing the code you can use to place the slot on your webpage. You can use the Copy to clipboard link to copy the embed code, which you can then paste and save in your website’s code. The code can apply to elements such as div and p.

  8. Click Save.

Experience Builder displays the new slot in the following locations:

  • In the Slots tab
  • On the webpage where you have created the slot

Highlight Slot On/Off: You can move between previewing your website and manipulating content in a selected slot. When slot highlighting is on, Experience Builder displays your slot with a border. In the Highlight Slot On/Off state, navigating around webpages, or clicking links is not possible. When slot highlighting is off, you can click links, navigate around your webpage and see the slot as it displays to your website visitors. Highlighting remains on until you turn the setting off by clicking Off or by collapsing the sidebar. Navigating to the Slots tab systematically turns highlighting On.

After you have added all your desired slots, you can use rules to determine the content variations you want to display in your slots.

Managing your slots

Depending on your needs, you can edit existing slots, or remove them from your website if no longer needed. Each slot lists all the different webpages of your website where you have embedded the slot. By default, the current webpage you are viewing is always entered in the field. Other webpages included in a new line break use the relative path to the current webpage.

If you have not embedded the slot code in a webpage—for example, if you have created a slot with several webpages added, but haven’t added the code to the webpages yet—the slot displays the following warning message: Slot code not found on page. Click Configure to retrieve the embed code, or click Delete to remove the slot from the webpage.

If a single node defines a slot on a single webpage, and you delete the node, the slot will no longer display in the user interface. The slot may display as deleted, but the slot information still exists in the database and is retrievable using the API. If you recreate a node with the same path, the slot information will again display in the user interface.

If a slot displays a flash of unstyled content, you can alter the initial display of the slot to prevent unstyled content from displaying.

Editing your slots

To edit a slot, complete the following steps:

  1. Click the Create > Slots tab.
  2. Click Configure to make changes.
  3. Click Save to save your changes or Cancel to discard changes.

Deleting your slots

To delete a slot, complete the following steps:

  1. Navigate to the webpage where the slot exists.
  2. Click the Slots tab.
  3. Find the slot you want to remove, and click Delete.
  4. If there are rules associated with the slot, they will be deleted as well. Experience Builder displays a confirmation box displaying the number of associated rules. Click Delete to confirm deletion.

If you have embedded HTML paragraph tags in your embed code and you delete a slot, the embedded HTML will no longer display on the webpage, with or without slot highlighting enabled causing the embedded HTML to hide from view.

Next, you must create rules to place content in the slots.

Adding CSS to a slot

You can add more styling to a slot’s content by adding a data attribute on the slot’s <div> specifying an external stylesheet to load into the slot. Adding external CSS is primarily useful for untrusted slots rendering inside of an iframe which need the external CSS. To learn more about trusted and untrusted modes, see Content replacement modes.

<div data-lift-slot="my-slot-id" data-lift-css="http://mysite.com/custom_slot.css"></div>
Learn more by visiting the Acquia Academy (sign-in required) for the video Theming with Acquia Lift.

Creating a customizable slot

You can serve decisions and content to a webpage, but not inject the content into the webpage. Using the content replacement mode, returned content broadcasts with JavaScript events, allowing your website’s JavaScript to customize the output to meet your website’s needs.

Retrieving a list of defined slots

Using the Postman HTTP-HMAC package, you can retrieve a full list of the locations on your website with slots created earlier. To retrieve the slot list, construct an API call based on the parameters in the /slots endpoint in the Acquia Lift Decision API, replacing [domain] with your Profiles API URL, [site_id] with your Acquia Lift website ID, and [account_id] with your Profile Manager account ID:

https://[domain]/slots?site_id=[site_id]&account_id=[account_id]

To retrieve your API URL, site_id, and account_id, see the Profiles API reference. For more information about the Postman HTTP-HMAC package, see Using the Acquia Lift APIs.