Product Pricing Live Demo
Tracking, Security & Compliance

How do I track conversions with a custom script?

  • 3 minutes
  • Premium, Enterprise and Unlimited

Quick answer

Open the campaign's Global section, expand Conversion and Tracking Script and paste the JavaScript you want to run after a successful sign-up, for example a gtag event for Google Analytics or an fbq CompleteRegistration event for the Facebook Pixel. The script runs once per sign-up, on the page where the pop-up was shown.

Available on: Premium, Enterprise and Unlimited plans.

CrazyRocket allows triggering custom javascript code after the sign-up.

The script can track conversions on Facebook, Google, or other marketing tools.

If you want to track events on Facebook and/or Google Analytics, ensure that the Facebook Pixel and Google Analytics scripts are installed on the page.


Add your tracking script


Edit your campaign, click on the Global Settings tab, scroll to the bottom, and expand the Conversion Script section.



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

You can use the following placeholders to send the pop-up results to your script:

{email} - e-mail address entered by the user
{name} - name entered by the user
{phone} - phone number entered by the user (if available)
{coupon} - coupon assigned to the user
{optin} - true if the user opted-in
{description} - the coupon description

These placeholders can be used on your Conversion Script to perform complex automation tasks on your site.

Example #1 - Track Sign-up on Google Analytics


<script>
ga("send", "event", "Signup", "Submit", "CrazyRocket Wheel Sign-up");
</script>

Example #2 - Track event on Facebook


<script>
fbq("track", "CompleteRegistration", {content_name: "spin-wheel-signup"});
</script>

People also ask

Do I need this to see opt-ins?

No. The dashboard counts views, opt-ins and conversion rate per campaign on every plan. The script is for your own analytics and ads tools.

Can I add tracking pixels without writing code?

Tracking pixels are included from the Premium plan; the conversion script is the place to paste the snippet your ads platform gives you.

Still stuck?

Our support team always replies. Send us a message and we'll help you sort it out.

Contact support
🍪