Web tags let you associate information with contacts based on the pages they visit on your website. You can use them, for example, to identify interests, create audiences, personalize content and communications, or trigger automation flows based on browsing behavior.
To use web tags, you must have a web property where the Analyze and personalize the experience option is enabled under "What do you want to do on the website".
Web tag availability also depends on your plan: if the Web tags section is available in your account, you can use the features described in this article.
You can associate a web tag with website pages in two alternative ways:
- Using rules configured in magnews: create the web tag in magnews and define which pages activate it based on elements such as the URL or page title.
-
From your website's HTML code: add the
mnwebtagsmeta tag directly to the pages where you want to associate one or more web tags.
If you use the mnwebtags meta tag, the web tag must also be available in magnews. You can create it manually or let magnews create it automatically when it receives it from your website.
Create a web tag in magnews
Go to Journey Lab > Web tracking > Web tags.
Here you can view the web tags available in your account.
Select Add web tag and configure:
- Name: the name used to identify the web tag in magnews.
- Web tag ID: the identifier used to reference the web tag in scripts and other magnews features.
- Notes: add any useful information to describe the tag or how it is used.
You can then define which pages should trigger the web tag.
Identify pages using rules
PYou can define directly in magnews which pages should activate the web tag.
Select Add rule and configure:
- Page element: choose the element to check, such as the page URL or title.
- Operator: specify how the page element should be compared with the value.
- Value: enter the text to compare with the selected page element.
The available operators let you check, for example, whether the value:
- Contains specific text.
- Starts with specific text.
- Ends with specific text.
- Is equal to specific text.
- Matches the regular expression you enter.
The comparison is case-insensitive. When using matches the regular expression, enter a regular expression in the Value field.
You can add multiple rules to the same web tag. In this case, at least one rule must be met (OR) for the web tag to be recorded.
Associate web tags from the HTML code
As an alternative to rules configured in magnews, you can specify directly in the page HTML which web tags should be associated with the visit by using the mnwebtags meta tag.
For example:
<meta name="mnwebtags" content="men" />
<meta name="mnwebtags" content="women,products" />ou can specify one or more web tags, separated by commas.
This method is useful when your website or CMS already knows how each page should be classified and can send this information directly to magnews.
Make website web tags available in magnews
Web tags passed through mnwebtags can be used by magnews only if they are also available in your account.
You can manage them in two ways:
- Manual creation: create all the web tags used on your website in Journey Lab > Web tracking > Web tags.
- Automatic creation: enable Automatically create web tags on website pages in the advanced settings of the web property. When magnews receives a web tag from the website that does not exist yet, it creates it automatically.
If automatic creation is disabled and the website sends a web tag that does not exist in magnews, that web tag is not used.
Automatic creation is available up to the limit of 2,500 web tags.
Which method should you use?
Use rules in magnews when pages can be identified by characteristics such as their URL or title and you want to manage the classification directly in the platform.
Use mnwebtags in the HTML code when your website or CMS already knows which tags should be associated with each page.