Skip to main content

Add a survey, page, or form to your website as a popup

Add a survey, page, or form to your website as a popup, set when it shows, and publish it with the Dotdigital Tag or a code snippet.

Written by Gareth Burroughes

A popup shows your survey, page, or form over a page of your website, without embedding it in the page. You choose when it appears and who sees it, then publish it with the Dotdigital Tag or by adding a code snippet to your site.

To put it inside a page instead, see Embed a survey, page, or form on your website.


Before you start


Generate the popup code

  1. Go to Content > Surveys, pages, and forms, and select your survey, page, or form.

  2. Select Published page at the top right.

  3. Under Generate embed or popup code, select Generate popup code.

  4. Expand Triggers and select when the popup shows. The options are in the table below.

  5. Switch on any display rules you want, and enter the popup width in pixels. The default width is 600px.

  6. Set the accessibility options in the table below.

Generating the code doesn't show the popup on your site. To do that, publish it as described in the next section.

Triggers

Trigger

The popup shows when

Scroll depth

The visitor scrolls the percentage of the page you enter

Time spent on page

The number of seconds you enter has passed

Pages visited

The visitor has viewed the number of pages you enter, after the number of seconds you enter

Exit intent

The visitor moves their cursor towards the page's close button

Pages visited counts only pages that include the tracking script. If you publish with the Dotdigital Tag, that's every page of your site except any you leave out with URL rules.

Display rules

Rule

When it's on

Unidentified visitors only

Only visitors who aren't already contacts see the popup

Show again if submitted

Visitors who've submitted the popup see it again

Show again if dismissed

Visitors who closed the popup without completing it see it again after the number of days you enter

Accessibility options

Option

What it does

Accessibility label (ARIA)

Text that tells screen readers what the popup is for

Screen reader support

Tells screen readers to ignore the rest of the page while the popup shows

Show on mobile devices

Shows the popup on phones and tablets

Close with 'Esc' key

Lets visitors close the popup with the Esc key


Publish the popup

The code updates automatically as you change the popup settings. You can publish it in two ways:

Method

After you change the content

After you change the popup settings

Dotdigital Tag

Save and republish the page

Save and republish the page

Manual code snippet

Save and republish the page

Generate a new snippet and replace the old one on your site


Publish with the Dotdigital Tag

Before you start:

  • The Dotdigital Tag must be installed on your site. Learn how in Add the Dotdigital Tag to your website. After you add the Tag, wait one hour before you publish a popup.

  • In your Dotdigital Tag settings, Enable popup publishing must be set to Yes.

To publish:

  1. Select Go live on your website instantly.

  2. Expand Website name and select your website. This is the profile name you added when you set up the Dotdigital Tag.

  3. Expand Shows and select On all pages or Based on URL rule.

  4. If you chose Based on URL rule, set the rule as described in the next section.

  5. Select Publish now.

To try the popup on your site before you publish it, see Preview a popup on your website with the Dotdigital Tag.


Set URL rules

URL rules choose which pages of your site show the popup. A page shows it when its URL matches the keywords you enter, in full or in part.

  1. Expand the operator drop-down menu and select Contains, Does not contain, Is equal to, Is not equal to, Starts with, Ends with, or Matches wildcard.

  2. Select All of if the URL must match every keyword, or Any of if it must match at least one.

  3. Enter a keyword. To add another, select Add more.

For example, to show the popup on https://www.example.com/request-a-demo only, use Contains and the full URL. To show it on that page and https://www.example.com/demo-feedback, use Contains and the keyword demo. This also matches any other URL that contains demo.


Publish manually

  1. Select Manual publish.

  2. Select Copy code to clipboard.

  3. Paste the code onto each page of your site where you want the popup to show.

Did this answer your question?