---
title: "Leaving Notices — Shortcode & Click Trigger Settings"
description: "## Overview The  [Leaving Notices plugin extension to Popup Maker](https://wppopupmaker.com/extensions/leaving-notices/) allows users to display a confirmation popup when a link is clicked. The popup notifies a visitor that they are about to leave the page. When the visitor clicks the…"
url: "https://wppopupmaker.com/docs/leaving-notices/shortcode-and-click-trigger-settings/"
updated: "2024-12-23"
category: Extensions / Leaving Notices
---

# Leaving Notices — Shortcode & Click Trigger Settings

## Overview

The  [Leaving Notices plugin extension to Popup Maker](https://wppopupmaker.com/extensions/leaving-notices/) allows users to display a confirmation popup when a link is clicked. The popup notifies a visitor that they are about to leave the page. When the visitor clicks the popup button to confirm the notice, Popup Maker redirects the page to the link URL. 

A leaving notices popup is set with a shortcode and a Click Open trigger.   Internal links point to another page or post *within the same site*. External links point to a page or post *on a different site*. 

## **'Continue Link' Shortcode **

The Leaving Notices plugin extension registers a shortcode with WordPress ( tag: [pum_continue_link] ) to set the popup button text label. The plugin uses the Popup Editor shortcode button to easily set the shortcode in the content editor. This shortcode sets its attributes inside a single opening tag, which is visible on the 'Text' tab of the Popup Editor.

### How to Add a 'Continue Link' Shortcode in the Popup Editor

![file GnzpCydNmD](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5b9ea00428631d7a896684/file-GnzpCydNmD.png)1)  From the WordPress Admin, open the Popup Editor.

  2)  Navigate to the Popup Maker shortcode button in the Editor menu. Select the button to display a menu of Popup Maker shortcode options.   3)  Select the 'Continue Link' option.   4)  A shortcode settings box labeled 'Continue Link' will display in front of the Editor.  

## Set Shortcode in the 'Continue Link' Box

### 'General' option settings tab 

![file Cp8icjRaUv](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5b9eed2c7d3a03f89d153f/file-Cp8icjRaUv.png)

**'Continue Text' ( text field )  --***Plugin default: 'Continue'*. Change the default value of the popup button label in this field.

*Shortcode Attributes*

```
<!--The popup label is set with the shortcode's 'text' attribute-->
<!--The plugin default value for 'text' is shown below.-->
```

[pum_continue_link text="Continue"]

**'Continue links will open in a new window or tab.' (checkbox) --** *Plugin default: unchecked ( 'off' ).* By default, the popup opens the targeted link in the same browser tab. *To open the link in a separate browser tab*, set the checkbox to 'checked'. 

*Shortcode Attributes*

```
<!--By default, targeted links open in the same browser tab.-->
<!-- value = 'unchecked' (plugin default) -->
no attribute displayed

<!-- value = 'checked'; open link in separate browser tab.-->
```

[pum_continue_link target_blank]

Select the 'Save' button to save any updates to the shortcode settings box.

![file bRqtdW3yzU](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5ba2140428631d7a896696/file-bRqtdW3yzU.png)

A popup button with the default value assigned to the 'Continue Text' field is shown above on the Editor's 'Visual' tab.

---

## Set a 'Click Open' Trigger in the 'Leaving Notices' popup. 

![file XonAR5m3g9](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5af0b2480428631126f1c808/file-XonAR5m3g9.png)

1) In the Editor, go to **'Popup Settings' (box) >> 'Triggers' (option tab) >> ‘Triggers & Cookies' (option category)**. 

2) Select the **'Add New Trigger'** button to open the trigger selection box. 

![file aEz9gCh2M0](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5ba4642c7d3a03f89d1557/file-aEz9gCh2M0.png)

3) Within the trigger box, the default option is “Click Open”. Leave the cookie creation checkbox beneath the trigger menu options  *unchecked.*By not setting a cookie,* *the Leaving Notices popup can display each time the targeted link is clicked by a visitor. 

4) Select the **'Add'** button to set a Click Open trigger. 

5) The plugin will redirect to **'Click Trigger Settings' (box) >> 'General' (option tab)**.

---

## Target the Link in the 'Extra CSS Selectors' Field

> **Note:**This step assumes that the targeted link is already set within your site. **If the link does not yet exist, go create it now. **
>
>
>
> Then copy the top-level domain (TLD) of the link URL to a 'clipboard' for use within the trigger. For example, if the target link URL is:
>
>
>
> **'https://docs.wppopupmaker.com/article/262-leaving-notices-introduction',** 
>
>
>
> then the TLD would be: 
>
>
>
> **'https://docs.wppopupmaker.com/'**

![file SIf12LAdY8](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5ab2b678042863478ea7c25c/file-SIf12LAdY8.png)

At the right end of the 'Extra CSS Selectors' field, a caret links to a set of menu options to target all or part of a link URL. The targeting options include: 

1. Link: Exact Match;
2. Link: Containing;
3. Link: Begins With; and
4. Link: Ends With;

We recommend the selection of either menu options 2 or 3. These options are general enough to activate the popup trigger. They will also maintain the trigger if the entire target URL changes in the future. 

**Table 1. How to Target a Link Within the 'Extra CSS Selectors' Field**

| **Field Option** | **CSS Selector** | **Selector Targets URL** |
| --- | --- | --- |
| Link: Containing | a[href*="contains"]  | a[href*="{add-TLD-inside-quotes}"] |
| Link: Begins With | a[href^="begins_with"] | a[href^="{add-TLD-inside-quotes}"] |

The screenshot below is an example that uses the *'Link: Containing'* option. The Click Open trigger targets the TLD of *'https://docs.wppopupmaker.com/'*. The TLD replaces the term *'contains'* located between the double quotes. 

![file](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5ba6532c7d3a03f89d155d/file-yDuggNJxDQ.png)

---

## Popup Targeting; The Choice is Optional

![file qgTSDLX6k0](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5ab2c06b2c7d3a56d88730dc/file-qgTSDLX6k0.png)

  By default, Popup Maker sets a popup trigger to activate on *all pages and posts* of a site, whether a targeted link is present or not. Activated popups load in the page footer in preparation for a trigger event that will display the popup.      In our example case (see the next section), *the target link appears on only one page within the site*. To limit the *popup activation* to the specific page where the target link appears, select the ‘Targeting’ option tab to use the plugin’s standard targeting conditions. As the plugin user, the choice of targeting (limiting) the popup activation is up to you.    **Related article:**  ['Targeting' option settings](https://wppopupmaker.com/docs/controlling-popups/popup-settings-box-targeting-option-settings/)   **Related article:**  [Standard Targeting Conditions](https://wppopupmaker.com/docs/controlling-popups/standard-targeting-conditions/)   **Related article:**  [Advanced Targeting Conditions Introduction](https://wppopupmaker.com/docs/advanced-targeting-conditions/advanced-targeting-conditions-introduction/)

---

## The Leaving Notices Popup In Action

The screenshot below shows an external link set on the 'Home' page of a local development website. The developer tools console is opened below the link to show:

- the external link ( href="https://docs.wppopupmaker.com/article/262-leaving-notices-introduction"), and 
- the setting of a popup trigger, represented by *class="pum-trigger"*.

![file sVtEAlA5rk](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5babc00428631d7a8966b4/file-sVtEAlA5rk.png)

The next screenshot shows the Leaving Notices popup displayed when the link is selected. 

![file](https://s3.amazonaws.com/helpscout.net/docs/assets/559c68b9e4b03e788eda1692/images/5b5bae410428631d7a8966bb/file-NOFSKgV6xv.png)

When the confirmation button inside the popup is clicked, the visitor will be redirected to the external URL targeted by the Click Open trigger. 
