LaunchPop tests

Each page opens one popup. Use a normal browser window so the page can store the time and view-count limits.

The page-count pages are the exception. Open Page count 1 in a fresh tab and follow its links. Visiting other pages first changes the count.

Triggers

Trigger modes

These set more than one trigger. Any opens on the first. All waits for every one.

Content

Limits

Page count

Original samples

LaunchPop

LaunchPop is a modal an editor configures as a datastore item. Each item chooses whether any one trigger opens it, or every trigger must happen first. With no triggers, it opens on page load.

Usage

Load one LaunchPop item by name and pass it to the partial. This page loads the item named Default.

{%- datastore_item var launchpop_item = "Default" -%}
{%- if launchpop_item.is_valid -%}
    {%- include "/launchpop/v1/_launchpop.liquid" item:launchpop_item -%}
{%- endif -%}

The item has to belong to the LaunchPop datastore. The partial attaches /launchpop.js and /launchpop.scss.

Content

content_type chooses what the dialog shows.

Triggers

trigger_mode chooses how the triggers combine. It appears under the triggers only after two or more of them are set. With one trigger, or none, that choice stays hidden. When any trigger happens opens the dialog on the first one. When every trigger has happened waits until all of the ones you set are met. Leave every trigger empty to open on page load. The editor does not accept 0; a blank trigger is unset, and a 0 that reaches the page is ignored.

Trigger Field What it waits for
Scroll percent scroll_percent The visitor scrolls that percentage of the page (1–100). scroll_relative_to_footer measures the percentage to the footer instead of the bottom of the page.
Scroll distance scroll_pixels The visitor scrolls that many pixels (1–3000). The editor shows this only when scroll percent is empty, and the other way around.
Delay delay_seconds That many seconds after page load (1–120).
Exit intent exit_intent The pointer leaves through the top of the window. This is mainly useful on a desktop.
Idle inactivity_seconds The visitor does not move, type, scroll, or tap for that many seconds (1–1800).

Limits

The shared id field (id) is the key for these limits. Items that use the same id share one history. An empty id uses the item name, so each item keeps its own history.

Field Effect
min_pages Do not open before this page of the visit. The number includes this page, so 2 waits until the second page. Checked in the template from session.num_pages.
max_pages Do not open after this page of the visit. 3 still allows the third page. Checked the same way.
minutes_limit Do not open if this id was opened more recently than that many minutes. Stored in localStorage.
shown_limit Do not open if this id has already opened that many times in this tab session. Stored in sessionStorage.
breakpoints_to_exclude Do not open at the checked sizes: small (767px and below), medium (1199px and below), large (1200px and above).

Page limits apply whether the item opens on any trigger or on every trigger. If the visitor has not allowed a session, a page limit hides the popup, because the page number is unknown. Leave both page fields blank and the triggers run without a session.

Closing

The visitor can close the dialog with the close button, the Escape key, or by clicking the dark overlay. While it is open, only one LaunchPop dialog is visible and keyboard focus stays inside it.