Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
The Marketing Tags app is a central place to manage marketing tags such as Web analytics, third-party content and advertising network code snippets. The app allows you to create tags and place them on pages. Since many of these tags require cookies to work, you can also link tags to cookies defined in the Cookies app.
The app manages marketing tags, which are different from content tags. Content tags – keywords or terms assigned to an item of content – are managed using the Tags app.
What are marketing tags?
Since many of these tags require cookies to work, you can also link tags to cookies defined in the Cookies app. By linking tags to cookies, you can make sure the tags used on your website comply with data privacy rules.
For more information about what marketing tags are and how they are used, see:
- What are Third Party Tags and Tag Management?
- Google Analytics: Tracking Basics (Asynchronous Syntax)
The Marketing Tags app is installed by the Marketing Tags module. The app is configured at Configuration >
The app operates on the
marketing-tags workspace where the code snippets and their details are stored.
The Marketing Tags module registers a custom
mgnl:marketing-tag node type. The Marketing Tags app operates on nodes of this type.
The module inserts marketing tags into three alternative page areas:
headerScripts. To function correctly your page templates should contain these areas.
Example: Enterprise Edition Travel demo prototype in Web Dev > Site /
Area definition within a page template
optional, default is
When set to
ScriptsAreaModel : Area model for tag insertion. It looks through all the tags to determine which ones belong
to each tag area of the page.
required on Blossom*
Renderer to use. Magnolia supports
*) If not defining the renderType, Magnolia is using the one defined on the parent template (typically the page template). On Blossom you should define the renderType on the area too.
Setting tag properties
In tag properties, define a name for the tag and indicate where in page HTML it should be inserted. Usually the provider of the tag specifies where the tag should be added. If not specified, the safest is probably the
head element. If the tag takes a long time to load and delays page rendering put at the end of the body. Optionally you can also define a dashboard URL for viewing the information collected by the tag.
- Name: Name the service that provided the tag such as "Google Analytics".
- Dashboard URL: Address of an analytics dashboard provided by the tag service. A dashboard reports the information collected by the tag.
- Active on author: Check the box to insert the tag on pages also on the author instance. You may want to do this during development and testing so you can see the tag while using the Page Editor. Tags should typically only be inserted on the public instance.
- Tag location: Where to insert the tag in the page HTML. There are three options:
- head: inside the
- beginning of the body: right after the opening
- end of the body: right before the closing
- head: inside the
Setting tag content
Choose to which pages the tag should be added. Check the Insert in subpages box to insert the tag on all pages in a site branch. Alternatively, you can select a template. Tags are added to all pages based on the template.
Linking to cookies
Link a tag to a cookie defined in the Cookies app to control whether the tag's cookie is set or not.
Click Add and select a cookie from the Cookies app.
If you do not link a cookie definition to a marketing tag, the marketing tag is always set following the marketing tag definition only without checking cookie consent.
Create a tag with the following content:
- Check the Active on author box.
- Choose some pages where the tag is active.
- Open a page that has the tag in the Pages app. A popup is displayed.
Publish the tags from the author instance to the public instance.
Viewing the dashboard
Visit the website of the service that provided the tag in order to view the information collected by the tag. You can view the information in a separate browser window or in the Marketing Tags app. Click the Show provider dashboard action.
This example shows a Clicky dashboard. You need to be logged into the analytics service to see the dashboard.
Some dashboards such as Google Analytics cannot be displayed in a subapp. Google explicitly specifies in their headers that a dashboard cannot be displayed in an iFrame (
x-frame-options: SAMEORIGIN). To get around this limitation, click the link at the top of the subapp to open the dashboard in a new window.