Tracking Scripts


Drop-a-Deal allows to trigger two custom scripts:
  • On Load Script - fired when the campaign shows up on the screen
  • Conversion Script - fired right after sign-up
If you are looking to track events on Facebook and/or Google Analytics, make sure that the Facebook Pixel and Google Analytics scripts are installed on the page.

Add your tracking script


Edit your campaign, click on the Campaign tab, scroll to the bottom, and expand the Tracking Scripts section.



Make sure that the scripts start with the <script> and end with the </script> HTML tags.

You can use the following placeholders to pass the pop-up's results to your script:

{email} - e-mail address entered by the user
{coupon} - coupon assigned to the user
{optin} - true if the user opted-in

These placeholders can be used on your Tracking Scripts to perform complex automation tasks on your site.

Example #1 - Track Pop-up on Google Analytics


<script>
ga("send", "event", "CTA Button", "Click", "Drop-a-Deal Pop-up");
</script>

Example #2 - Track Sign-up on Google Analytics


<script>
ga("send", "event", "Signup", "Submit", "Drop-a-Deal Sign-up");
</script>

Example #3 - Track event on Facebook


<script>
fbq("track", "CompleteRegistration", {content_name: "drop-a-deal-campaign"});
</script>