Skip to main content

Email Capture

Modal window that overlays the page asking the viewer to submit their email address.

Overview

The email capture component provides a modal window to ask for the viewers email address. The main headline/cta, the selling points, and the terms at the bottom are controlled by a promotion on the BAM admin side. The subtext and button text have default values, but can be overridden by setting the appropriate attributes.

There are three different actions that cause the modal to appear and you can choose which you would like to use. The default is exit which detects exit-intent from the viewer and displays the modal. For desktop this means when the cursor moves out of the window. On mobile, this is where the user scrolls up a small percentage to display the navigation elements. For delay, the modal will show on the page 3 seconds after the page loads. For scroll, after the viewer scrolls approx. 30% of the page, the modal will show.

The email captured is sent to Rudderstack. You must inform us where you want the captured email to be sent. It also captures the URL of the page where the email was captured.

// custom defined tag
<bam-email-capture
dev-mode="true"
property-id="1"
promotion-id="298"
context="some-context"
display-action="scroll"
button-text="Sign me up!"
>
</bam-email-capture>
SSR AvailableThis component is available for server side rendering.

Properties

PropertyAttributeDescriptionTypeDefault
buttonTextbutton-textstring'Yes, I want free bonuses and offers'
callback--You cannot pass this parameter via an attribute. You must set the callback function after the DOM has loaded.() => voidthis.defaultCallback
contextcontext(required)stringundefined
darkModedark-modebooleanfalse
deferdeferbooleanundefined
devModedev-modebooleanfalse
displayActiondisplay-actionThere are three options to display the modal. delay will show the modal 3 seconds on page load. exit will fire on when the user is leaving the page. scroll will fire when the user scrolls down the page. Default is exit."delay" | "exit" | "scroll"'exit'
promotionIdpromotion-id(required) Specifies the single promotion for the ad spotnumberundefined
propertyIdproperty-id(required)numberundefined
subtitleTextsubtitle-textstring'Sign Up to our Newsletter to get our exclusive offers and welcome bonuses.'