Skip to main content

Content Blocker

Block certain content of a page

Overview

Untitled

The content blocker component will take a comma-separated list of identifiers to make a calls to determine if the the content it wraps should be blocked by a modal or be hidden depending on the user location. You can manually set the location or by default this will be determined by the request ip lookup.

To use the blocker, you will wrap whatever content you would like to block. The content can be any valid html.

Special Attributes

AttributeDescription
identifiersThis is a comma-separated list of identifiers w/ NO SPACES, see below. This will determine the specified compliance identifiers to check.
button-textSet the button text seen on the snippet, defaults to “Take Me There” (optional)
hide-if-blockedif "true", the content will not be rendered at all IF blocked. Otherwise, the content will be blocked by a modal that will include the text/link of the returned compliance tag.
// custom defined tag
<bam-content-blocker
property-id="1"
identifiers="canda-compliance,another-identifier">
{/* CONTENT GOES HERE */}
</bam-content-blocker>

Properties

PropertyAttributeDescriptionTypeDefault
buttonTextbutton-textSet the button text seen on the snippet, defaults to “Take Me There” (optional)stringundefined
deferdeferbooleanfalse
devModedev-modebooleanfalse
hideIfBlockedhide-if-blockedIf "true", the content will not be rendered at all IF blocked. Otherwise, the content will be blocked by a modal that will include the text/link of the returned compliance tag.booleanfalse
identifiersidentifiers(required) This is a comma-separated list of identifiers w/ NO SPACES, see below. This will determine the specified compliance identifiers to check.stringundefined
locationlocation(required)stringundefined
propertyIdproperty-id(required)numberundefined