When Do Masks Execute?

The ultimate goal of any good Monetate action is to blend seamlessly with your native site content. To achieve this goal, when you need to replace native content or hide it entirely, you must use content masking. A mask allows a temporary blank area on the page to show rather than the native site content. After the correct action has fired, Monetate removes the mask and the content served by Monetate appears to the end-user as though it is loading normally and is native to the site.

Masks must behave differently than other parts of Monetate actions because they need to execute immediately upon landing and remain in effect until Monetate serves the content. If a mask does not fire immediately, a visitor may see a momentary glance of the native site content that is then replaced with new Monetate delivered content. This is known as flicker and it negatively impacts the user experience. Flicker is highly dependent on the site visitor's load time and the placement of the Monetate tag on your site. You can also reduce flicker by effectively using masks on the correct element selectors and the correct URL paths.

Without Masking Enabled

This animation demonstrates a site loading with a Monetate action but has been slowed significantly for demonstration purposes.

Animated demonstration of an old version of the Monetate website rendered without masking enabled

With Masking Used Properly

This animation demonstrates a site loading with a Monetate action but has been slowed significantly for demonstration purposes.

Animated demonstration of an old version of the Monetate website rendered with masking enabled

It's important to understand how masks differ from actions and experiences. They are a separate entity and do not adhere to the same set of rules. Masks evaluate only the information provided by the URL and are not subject to additional conditions that restrict individual actions or whole experiences. They fire independently of other action conditions or who targets. The bullets below summarize the rules that masks follow:

  • Masks evaluate only the URL.
  • Masks are not restricted by action or experience conditions.
  • Masks always run if the URL condition matches and the action with the mask is currently active to any audience, even if the user does not directly qualify or the action does not fire for them.

    Atop an old version of the Monetate website appears an image of the Actions tab of Monetate Inspector showing that no actions are running, as well as an image of the Content Masks tab showing a mask was still applied

In this example, a visitor has not qualified for any experiences and was not served any actions. A mask is still delivered in the Monetate payload.