Articles on: Display Rules

How to trigger a poptin with the JavaScript trigger?

If you have a paid account, you will be able to show a poptin to users that made a specific action or event without any need to set up triggers in Poptin.

Go to your display rules and copy the link to the JavaScript trigger. Please notice that I have all other manual triggers turned off. You can definitely combinate it with others but at this guide, we will keep it clean.



Find a javascript function in your website code and put the copied link into it.

We prepared an example for you so feel free to get inspiration from it. There is a top button down on a demo site, and every time when the user clicks on this button he will get to the top of the page.



The goal is to show up Poptin at the moment when the user clicks on that button. The whole function including Poptin link can look like this.



That's it! Right now it is all up to you which javascript function you will choose on your website. You can use this javascript link on any of your functions. Find the right one and you can just paste the copied link there

Important: JS Trigger overrides any set trigger and targeting rules.

Updated on: 15/11/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!