Prepare the display
To properly trigger the display without conflicts:
- Navigate to Convert > All Displays.
- Select the display you'd like to trigger.
- Navigate to the Create step of the display builder.
- Make sure the Tab Design setting is set to No tab.
- Navigate to the Target step of the display builder.
- Select the When To Show section and ensure all the Automatically Show settings are disabled.
- Save the changes and Publish the display.
Create and apply the function
- Take note of the URL displayed when viewing the display page and copy the number listed after /displays. This is the display's ID.
- Add the function listed below to your site's HTML to create the button. Make sure to replace "XYZ" with your display number, update the button text, and style the button so that it matches your site's branding.
<button onClick="Privy('show', XYZ);">Attend Our Event</button>
See it in use
Once you add the button to your content, a visitor's click will trigger the display: