<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=1360553&amp;fmt=gif">

The Ecommerce Marketing Blog

The #1 resource for small and growing ecommerce brands

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

By Ben Jabbawy
3 minute read

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.


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


    Join 500,000 businesses growing their online sales with Privy  15 day trial. No credit cards. No coding. Install and go live with your first  campaign in just 5 minutes.  TRY PRIVY