How to use a custom call to action to trigger your Privy campaign

If you need to add custom call to actions on your site that trigger specific Privy campaigns, that is certainly possible. The process uses javascript calls, which needs to be deployed on your site. Privy support cannot help implement this for you. If you'd like to give this a try, here's what to do.

1. Click into the campaign details page in your dashboard.

2. Take note of the URL you see when viewing this campaign page.

Screen Shot 2015-10-23 at 12.27.38 PM.png

The numbers listed in the URL is your campaign number. Save this.

3. Add a custom call to action button, icon or image where you want it on your site.

call-to-action-example_final.gif

4. Use the "on click" javascript function as well as Privy.show(XYZ) where you would replace XYZ with your campaign number.

<button onclick="Privy.show(10552);">Attend Our Event</button>`

When it's set up correctly, it'll work like a charm. Here is an example:

There are a few minor nuances you should consider in your behavior and tab design settings.

  • Set auto show to never
  • Turn exit intent off
  • Leave mobile "on"
  • Remove tab all together