A work email address gives you the internet domain name of the person’s employer, which, besides allowing you to reach them with work-related offerings at their work email address, can be a key to unlocking other important data that can be appended to the Person record, including number of employees, revenue, SIC or NAICS codes, and DUNS number. So, if your organization prefers a work or business email address over personal a email address, then you can use this simple solution to add that functionality to forms.
To get this rich demographic and firmographic data though, you need to make sure that people are not submitting their personal email addresses on your Marketo forms. We see this request often, both on the Marketo Community and from our own clients. But Marketo does not not natively support this functionality.
Next, we need an error message to alert the user that they need to enter their business email address, something like: “Please enter your business email address.”
Finally, we need to create logic that determines whether the submitted email address is in the list of disallowed domains that we created, and, if so, to prevent the Marketo form submission from happening and instead alert the user to enter their business email address.
The following script does exactly that:
- define blocked email domains
- define error message to user
- determine whether email address contains blocked domain
- alert user to try again
To use the script, you will first need to download it to your computer.
Then, edit the list of domains you want to block if you want something different and update the error message to match your brand voice. Be sure to wrap each domain in quotes and separate them with commas. Do not include a comma after the last domain. (This will break the script.)
var domains = ['gmail.com','hotmail.com','live.com','outlook.com','yahoo.com','aol.com'] var error = 'Please enter your business email address.'
Last, simply upload it to your Design Studio and include in your Marketo landing page template(s) and in your website footer. Your <script> tag should look something like this:
Alternatively, instead of uploading to Marketo’s Design Studio, you or your web team can add it to your tag manager tool (like Google Tag Manager or Adobe Tag Management).
If added to your pages correctly, the script will fire when needed, automatically detecting Marketo forms on any page where it is included and extending their functionality to require a business email address.
About the AuthorFollow on Linkedin More Content by Jon Bourne