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:
<dependency> <groupId>info.magnolia.campaign</groupId> <artifactId>magnolia-campaign-manager</artifactId> <version>1.0-beta1</version> </dependency>
Pre-built jars are also available for download. See Installing a module for help.
The Campaign Manager module is configured in
Configuring the campaign template
campaignTemplate property must be set to point to the component definition you want to use for the campaign manager.
Path to to the component definition you want to use for the campaign manager
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
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.
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:
family 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:
Using campaigns on pages
To integrate a campaign on a page, include the component:
For example, it has been added to line 16 of
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.