How to set up a custom trigger for a popup

With Attrac, you can set a custom trigger for each popup to appear under specific conditions, other than time, page scroll, or exit-intent. This custom trigger can be any of the following:

  • From another Attrac campaign (bar or embedded banner).
  • By clicking a link.
  • By clicking a button.
  • By triggering it from code.


To set the custom trigger, follow the instructions below. The provided examples will guide you through the process.


Get the custom trigger code for the popup

Each popup campaign on Attract has a unique trigger code. You can find this code in the popup's settings under Style & Behavior > Trigger. To obtain the code, navigate to the Trigger section and set the Trigger type to "Custom". A code will be displayed, which you can copy and use in the next step.


Option 1: Trigger from an Attract bar or embedded banner

To display the popup when a call-to-action is clicked on an Attract bar or embedded banner, simply paste the custom trigger code you obtained from the previous step into the call-to-action URL field.


Option 2: Trigger when a text link is clicked

To trigger the popup from any link in your store, just add the custom trigger code in the link's HTML tag, as shown in the following example:

<a href="#" onclick="aph_popup_open(604782);">Link Text</a>


Option 3: Trigger when a button is clicked

To trigger the popup from any button in your store, just add the custom trigger code in the button's HTML tag, as shown in the following example:

<button onclick="aph_popup_open(604782);">Button Text</button>

Still need help? Contact Us Contact Us