You can publish user messages on sites and subsites. Privacy & messaging uses site matching to determine which of your messages to display on a specific site or subsite. The goal of this article is to help you make sure your published messages are displayed on the correct site and/or subsite.
Publishing messages to sites and subsites
When you publish a user message on a site, the message is displayed on that site and all of its subsites.
If you publish a message on example.com
, it means that the message will also appear on the following subsites:
example.com
example.com
abc.example.com
def.example.com
xyz.abc.example.com
How messages are matched to sites and subsites
If you publish different messages on a site and its subsites, Privacy & messaging will match each message to the most specific site/subsite.
If you publish message A on example.com and message B on abc.example.com
, then:
- Message A will display on
example.com
. - Message A will display on
example.com
. - Message B will display on
abc.example.com
. - Message B will display on
xyz.abc.example.com
, because message B is published on a more-specific site (abc.example.com
) than message A (example.com
).
This is important for any properties of the site that affect the message, such as URL path inclusions and exclusions, the site's name, or the site's image.
Let's say you've set up the following:
example.com
has a path inclusion on/articles/
.example.com
does not have any path inclusions set.- Message A is published to both
example.com
andexample.com
.
In this situation, users will see different behavior based on whether or not they're visiting example.com
or example.com
:
- When users visit
example.com
, message A will only be displayed if the URL path is under/articles/
. - When users visit
example.com
, message A will be displayed on all paths, because Privacy & messaging will match the message to the more specific published-to site, and there is no path inclusion set on the site.
If you wanted the same site configurations to apply to example.com
and example.com
, you would only publish your message on example.com
, and allow example.com
to inherit its configurations.
www
subsite if you want different behavior between your www
subsite and the "naked" domain.Publishing different message types
It's important to note that publishing a message of any type to a site will affect the site matching process for all message types.
If you publish a European regulations message (message A) on example.com
, and publish an ad blocking recovery message (message B) on abc.example.com
:
- Visitors to
example.com
will only ever see message A. - Visitors to
abc.example.com
will only ever see message B. - Visitors to
xyz.abc.example.com
will only ever see message B.
if you publish a European regulations message (message C) on abc.example.com
, and an ad blocking recovery message (message D) on example.com
and abc.example.com
:
- Visitors to
abc.example.com
will be eligible to see message C and message D over time. - Visitors to
example.com
will only be eligible to see message D.