Page tree
Skip to end of metadata
Go to start of metadata

The Campaign Manager module allows you to create, manage and schedule campaigns and rich banners in one place with comprehensive editing options.

Use the Campaign Manager module to craft appealing campaigns with complex layouts. Each campaign you create is essentially a component you can then use in a page. While content apps focus on managing structured content, the Campaign Manager module provides an authoring experience similar to that of the Pages editor with visual feedback and layout capabilities.

Campaign component on a page:

Campaigns and their run dates:

Settings run dates for a campaign:


Maven is the easiest way to install the module. Add the following to your bundle:


Pre-built jars are also available for download. See Installing a module for help.


The Campaign Manager module is configured in /modules/campaignManager.

Node name







Configuring the campaign template

The campaignTemplate property must be set to point to the component definition you want to use for the campaign manager.

Node nameValue









Path to to the component definition you want to use for the campaign manager

For example: travel-demo:pages/home

Configuring user roles

You must assign the campaignManager role to the anonymous user. If anonymous does not have this role, then the campaign component cannot access the info.magnolia.contentPerformance.models.CampaignContentModel model class http client.

You manage roles in the Security app.

Configuring the defaultBaseUrl

The campaignManager model class uses the defaultBaseUrl to construct the correct internal URL to request and embed the campaign in your pages. The URL is set in /server/defaultBaseUrl and needs to be set to your actual context path.  If the context path is set to magnolia instead of the actual context path, the default base URL is not configured properly. Make sure that the right defaultBaseUrl is used.

Node nameValue



Adding and scheduling a campaign

In the Campaign Manager app, click Add campaign to add a new campaign.

 You can schedule a date and time for the campaign to start and end using the Set campaign live date action.

Use the Select category field to select a category. You can use categories to place campaigns based on categories in pages

Some examples of categories in the Magnolia Travel Demo are tour types: activebeachculturalfamily and so on.

Writing a campaign template

Campaign templates typically contain a default header and footers to give authors visual feedback on how the campaign will appear.

To make sure that the default headers and footers are not included when the campaign is displayed on a page, the following tags should be applied in your campaign template:

Sample code
[#if cmsfn.editMode]
  <!DOCTYPE html>
      [ /]

[@cms.area name="main"/]

[#if cmsfn.editMode]

Using campaigns on pages

To integrate a campaign on a page, include the component: campaignManager:components/campaignManagement/managedCampaign 

For example, it has been added to line 16 of travel-demo/pages/components/home.yaml

dialog: travel-demo:pages/pageProperties

renderType: site
type: home
    type: list
        id: mtk:components/textImage
        id: travel-demo:components/teaser
        id: travel-demo:components/columnLayout
        id: campaignManager:components/campaignManagement/managedCampaign
    editable: true

You can then select the Managed Campaign component in the page:

In the Select a fallback campaign field, select a default campaign to be displayed if no scheduled campaign is available when the user visits. 

Choose a category in the Select a category field if you want to display campaigns that are in the active timezone AND match a given category.


  1. Hi Christoph Meier

    I want to use this module, when integrated into our Enterprise package i get the vaadin UI error, not sure of this module is being maintained. Let me know if there is a new version of this with vaadin8 implementation.



    1. Hi Swamy

      This page requires an update. Sorry for the inconvenience.

      The module already has been updated. 2.0.1 is the latest now. Works with vaadin8.

      But please note, that the artifacts have been moved to another repository.

      You may have to update the maven {{settings.xml}}. Add these snippets at the appropriate section:


      Username/password for sure you must change (wink)

      I hope this helps,