> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.popup-builder.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Trigger a Popup by Clicking on a URL

It is possible to open the popup when the certain URL on the website is clicked.
First, the popup will open. 
Once the popup is closed, the user will be redirected to the same URL or another.

Please, check the required steps below.

* Create the popup which you want to be opened, when the URL is clicked and from the **Events** section choose the **Set by CSS Class** event.

![](https://storage.crisp.chat/users/helpdesk/website/3fee58eaeb6dda00/screenshot16_vfyqdc.png)

* Open the editor of the appropriate page/ post, switch to the **Text **tab and and insert the code below:

**<a href="https://popup-builder.com/" class="sg-confirm-popup-19282">https://popup-builder.com/</a>**


![](https://storage.crisp.chat/users/helpdesk/website/3fee58eaeb6dda00/screenshot17_1ddtwf5.png)

### Where:

* **href** = https://popup-builder.com/ (required attribute of the link, where the user will be redirected after closing the popup)
* **class** = sg-confirm-popup-19282 (19282 is an ID number of the popup, which will open when the URL is clicked)

* Right after, **Publish** the page/ post.

In this case, when the URL, that is **https://popup-builder.com/** is clicked, the popup will appear.
Users will be redirected to **https://popup-builder.com/** once they close the popup.

| If you want to redirect the users to different URL, ensure to change the URL from the code inserted into the page/post.

Please, also check the gif below to visualize the steps:

![](https://storage.crisp.chat/users/helpdesk/website/3fee58eaeb6dda00/animation_66yaat.gif)

