How to set up conversion tracking

You can register your own JavaScript functions as callbacks when website visitors interact with your widgets. Callbacks enable you to send data collected with your widgets to third party applications or send an event to Google Analytics every time someone fills out a form on your website. More detailed information on how to use callbacks is available here.

Using callbacks, you can also add a conversion tracking pixel to your GetSiteControl widgets. Conversion tracking pixel is a small piece of tracking code that can be placed on any page of your website. This code lets you track the actions that visitors take on your website, so you will be able to see how GetSiteControl widgets affect your conversion rate. We will use Facebook tracking pixel as an example, but you can use any other conversion tracking tools the same way.

Note that Facebook tracking code should already be installed on your website. You can find the installation instructions in the Facebook for Developers documentation.

Here is the method you should use:

_gscq.push(['callback','submit', function (widgetId, data) {
    /*Call fb track here*/
    window._fbq.push(['track', '1234567890', {'value':'0.00','currency':'USD'}]);
}]);

If you want to track conversions via Facebook Tag API you will need to use the following method:

_gscq.push(['callback','submit', function (widgetId, data) {
    /*Call fb track here*/
    fbq('track', 'Lead');
}]);

The above methods will enable you to track conversions for all GetSiteControl forms on the page. If you want to track one specific widget only, you will need to specify its unique ID as shown below:

_gscq.push(['callback','submit', function (widgetId, data) {
    /*Call fb track here*/
   if (widgetId===29269) {
        fbq('track', 'Lead');
   }
}]);

The unique ID can be found in your GetSiteControl dashboard - it is indicated in the lower right corner of each widget in the list.

null