Information for: DEVELOPERS   PARTNERS   SUPPORT

Dynamic web content

Dynamic web content is one of the several methods that Campaign Studio users use to personalize the web experience for their contacts. Marketers can display different content to different people in specific areas of a webpage. Campaign Studio users may want to personalize content based on the data collected about the website visitor. Even anonymous contacts may see dynamic content, if you have collected any information about them. For example, location data.

Preparing for personalization

Planning

Before you can create personalized content, consider:

  • Where on your website or webpage do you want to include personalized content?
  • What audience(s) do you want to personalize the content for?
  • Do you have the necessary information in your database, enabling Campaign Studio to identify who should see your personalized content?

Campaign Studio configuration

For Campaign Studio to pass information back and forth with your website, you must configure your CORS settings.

  1. Log in to Campaign Studio.

  2. Click the Settings icon on the top right corner.

  3. Click Configuration > System Settings.

  4. In the CORS Settings section, ensure that the Restrict Domains field is set to Yes (default).

    Restricting your domains ensures that your Campaign Studio instance is not accessible to the Internet.

  5. In the Valid Domains field, =dd the domains you are using with your Campaign Studio instance. Include any domains using dynamic content.

System Settings - CORS Settings

Website preparation

Once you have determined where on your website you want to display personalized content, you must create an area to add the content. Campaign Studio is CMS-agnostic; add a dynamic web content slot to any website you have created. To do this, create an HTML slot where the dynamic content will display.

Creating content

Default content

Default content is the content that visitors see when they do not meet the criteria you have set for the dynamic web content, or are not tracked as a known contact. You want to have content in the section of the page you have set aside for personalization rather than an empty area. Build the content directly on your site.

Note

If you are using focus items as your dynamic content and only showing specific focus items to specific audiences, you do not need default content. Focus items are pop-ups and they do not take up an area on your page.

Dynamic content

Campaign Studio has both campaign-based and non-campaign-based dynamic web content. To create either:

  1. Log in to Campaign Studio.

  2. In the left navigation pane, click Components > Dynamic Content.

  3. On the Dynamic Content page, click +New to create a new slot.

    Campaign Studio displays the New Dynamic Content page.

    New DWC Slot

  4. Enter values for the following fields:

    • Internal Name (Required): How the slot is displayed in your list of dynamic web content slots. Acquia recommends including the information on the following:

      • Data point(s) that you are personalizing. For example, country.
      • Content in the slot. For example, United States.

      If you were creating a personalized slot for people in the United States, you can name the slot Country - United States. If you plan to have more than one personalized content slot for the same audience across your website, include the page title or other identifying information for the particular slot.

    • Content (Optional): Use the WYSIWYG builder to create the dynamic content slot. You may include images and videos. If you prefer HTML, click the </> icon in the toolbar to switch to the code view. Campaign Studio’s dynamic web content supports tokens like in landing pages or emails. To add a token, click the tag icon in the WYSIWYG toolbar. Supported tokens include:

      • Contact field: {contactfield=fieldalias}
      • Landing page link: {pagelink=ID#}
      • Asset link: {assetlink=ID#}
      • Form: {form=ID#}
      • Focus item: {focus=ID#}
    • Category (Optional): You can organize your dynamic content slots based on their parameters such as goals and campaigns. For more information, see Global Categories.

    • Language (Optional): Campaign Studio enables marketers to present content in multiple languages. You may use the same slot and display the content in various languages depending on the country where a contact is accessing the content from. To create content in more languages, select the language you are creating a variant in.

    • Is a translation of (Optional): If you are creating a slot in a second language translation, select the original slot you are translating. The same slot is displayed based on either a campaign or the filters you have set. However, the content is translated if a visitor is viewing the page where the slot is in a country where a different language is used.

    • Published (Optional): When set to Yes, a dynamic content slot is displayed on your website. When set to No, visitors see the default content.

    • Is campaign based? (Optional): When set to Yes, you can push a dynamic content slot to a contact based on them viewing a specific page within a campaign. When set to No, you can select filters for visitors to meet specific criteria to see the content.

    • Requested slot name (Required): For non-campaign-based dynamic content, the name used in the code added to your website. Or, the name you use to add a dynamic web content slot to a Campaign Studio landing page. It is possible to have multiple slots for the same data point, so the name is often generic. For example, country. Acquia recommends referencing the slot name in the item name as well.

    • Google Analytics UTM tags (Optional): Use UTM tags to track your leads which convert from dynamic web content slots, and indicate the lead source in Google Analytics or Campaign Studio reports. For more information, see UTM Tags.

  5. Click Save.

Campaign-based dynamic content

Decision - Request Dynamic Content

Request Dynamic Content

Use a Campaign Decision for Request dynamic content to use campaign-based dynamic content. The Campaign Decision checks if a campaign member visits a page where a dynamic content slot is. Visitors to a page where a dynamic web content slot exists will receive the dynamic content.

To create the dynamic content request:

  1. Enter a Name. The name is for the campaign event. Start the name with something like Req-DWC: so when you are looking at campaign reports, you can see the event type.

  2. Enter a Requested Slot Name. Campaign Studio checks for the slot name. You can see how many contacts got to the campaign event where you are checking if their visits request the slot.

    For example, Req-DWC: Country-Header. The requested slot name is the slot Campaign Studio looks for on the page. If it is on a third-party page, it will be in the code you use to add the dynamic content slot to your page. If it is on a Campaign Studio landing page, define the slot name on the landing page.

  3. Choose an item from the Select Default Content menu. The content chosen here displays to visitors who do not meet the conditions set at the next stage of the campaign. Users may see the default content first, before Campaign Studio pushes the dynamic content.

  4. Select +Add to add the request, or Cancel to discard the changes.

Condition - filter

Campaign Condition - Contact Field Value

To decide which dynamic content slot you want to push, you must have a filter within the campaign. This happens with Conditions. You may use any condition type to see if a contact meets whatever criteria is relevant to the dynamic content slot.

Action - Push dynamic content

Campaign Action - Push Dynamic Content

This action type appears as an option later in a campaign than the Requests dynamic content decision event. If a contact meets the condition, Campaign Studio pushes the personalized content for the criteria.

When using this campaign action:

  1. Add a name for the action. Best practices start the name of the event with DWC: and include the name of the slot you are pushing. For example, DWC: Country-Header-US.
  2. In the Select Dynamic Content menu, choose the slot from your Dynamic Web Content slot list you are going to push. The slots you have set as campaign-based in the selection list display. If you have not created a slot, click +New Dynamic Content to a new window and create a slot.
  3. When finished, click Update to save, or Cancel to discard your changes.

You may set up multiple conditions following the decision, with a different DWC slot on the Yes path for each. If the contact does not meet any of the conditions, they will see the default content selected in the decision. Visitors will also see the default even if you do not have anything on the No path for the condition. Here is what a sample campaign sequence looks like:

Campaign - Dynamic Content Sequence

Non-campaign-based dynamic content

Filter-based DWC

Using a filter is the recommended way to use dynamic web content as filters are often easier to configure.

  1. Go to the Filters tab.
  2. Configure the criteria contacts must meet to see the DWC slot.

Any time a contact visits a page you have added the slot to and meets those filters, Campaign Studio displays the personalized slot.

Implementing dynamic web content

Users may add dynamic web content either to a Campaign Studio landing page, or to an external website.

Campaign Studio landing pages

  1. Drag in a text block.
  2. Using the Merge Tags menu from the text editor, select the name of the slot that you want to display on the page. The builder populates with a token formatted as {dwc=slotname}.

If a visitor is unidentified or does not meet the criteria for the dynamic web content, no content displays in that area of the landing page unless a slot with opposite filters is created using the same slot name.

In campaign-based dynamic content, when a visitor who is a contact in the campaign hits a page containing the dynamic web content slot configured in the campaign decision, the visitor will see dynamic content. In filter-based dynamic content, visitors will see the dynamic content for the slot with the same name for which they meet the criteria. On a landing page, use the slot name for the dynamic content that you want to show. Even if you have multiple slots with the same name, Campaign Studio will match the visitor to the filters for each slot and display the appropriate slot.

Note

When editing a landing page in Code Mode, either enter the token for {dwc=slotname} or use the code indicated in the External websites section.

External websites

When building your page, you must create the area to personalize. In that area, add the following HTML tag:

<div data-slot="dwc" data-param-slot-name="slotname">
<h1>Default content</h1>
</div>
  1. Replace slotname with the slot name you create in the campaign or on the non-campaign-based DWC slot.

  2. Add your own default content between the <div> tags to ensure that the content displays, even if a contact is not known or does not meet the criteria you have set up.

    The plugins for Joomla! and Wordpress use shortcodes to enter dynamic web content.

    • Joomla!: {mautic type="content" slot="slotname"} Insert default content {/mautic}
    • Wordpress: [mautic type="content" slot="slotname"] Insert default content [/mautic]