Giveaway Tracking Scripts

Getting Started

Giveaway Ninja allows to run two custom scripts when these two events happen:

  • On Load Script - fired when the campaign shows up on the screen
  • Conversion Script - fired right after sign-up

Those scripts can be useful to send events to Facebook and/or Google Analytics.

For instance, you can track an event on Facebook to retarget users that joined a specific giveaway.

Tracking scripts are optional, and setting them up makes only sense if you are running a very well-structured marketing funnel.

IMPORTANT

If you are looking to track events on Facebook and/or Google Analytics, make sure that the Meta Pixel and Google Analytics SDKs are installed on the page, but most likely you already configured them when you launched your shop

Usage Cases

Conversion Script and Facebook

The "Conversion Script" fires when a user joins the giveaway by entering the email or clicking on the "Login with Facebook" button.

For instance, the following script could be used to track a "JoinGiveawayMarch" event:

fbq('trackCustom', 'JoinGiveawayMarch')

Once tracked, the event can be used in many ways on the Facebook platform:
https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking/

If you are running Ads to promote your giveaway, the event can be used to track a conversion important to understand the Ads performance.

Testing

Once you setup the giveaway make sure to check the event gets tracked correctly.

  • Enter the giveaway with different emails to emulate new signups
  • Check the Facebook Event Manager to make sure it is collecting data
Please note: the event manager does not update immediately and might take some minutes (or even an hour) to show up initially.

The browser's console log can be very useful to check if the scripts are firing and sending data to the desired tracking service (Facebook Pixel or Analytics).

This requires some technical skill though, just reach out for our support and we'll double check the tracking.

Other Examples

Example #1 - Track Pop-up on Google Analytics

<script>
ga("send", "event", "CTA Button", "Click", "giveaway-popup");
</script>

Example #2 - Track Sign-up on Google Analytics

gtag('event', 'sign_up', {
  method: 'Giveaway',
  event_label: 'Giveaway Sign-up'
});

Example #3 - Track form registration event on Facebook

<script>
fbq("track", "CompleteRegistration", {content_name: "giveaway-campaign-xmas"});
</script>

Reference

Google Analytics for developers
https://developers.google.com/analytics/devguides/collection/ga4


 Need Tracking Help?