You can track conversion with ClickGUARD if you’ve previously installed the tracking code JavaScript snippet.

Important: Tracking code has to be installed before conversion code in order to capture conversion.

Why should I track conversion events?

By having ClickGUARD track conversion you can get notified or block visitors that often click on your ads but never convert.

Tracking conversion on a “Thank You” page

In order to track conversion simply paste the following code snippet on the page where a visitor ends up after conversion takes place:

<script type="text/javascript">
(function(){ cg_convert(); })();
</script>


Place the code snippet before the ending </body> tag, after the tracking code snippet.

Tracking a conversion event

If you would prefer to attach the conversion trigger to an event on your page, you can call the cg_convert() function anywhere in your page JavaScript code, after page load.

Here's an example of how to attach it to a “Subscribe” button click using plain JavaScript:

<script type="text/javascript">
$(function(){ document.getElementbyid('subscribe-button').addEventListener('click',function(){ cg_convert('newsletter signup'); }); });
</script>


Here's an example of how to attach it to a “Subscribe” button click using jQuery:

<script type="text/javascript">
$(function(){ $('#subscribe-button').on('click',function(){ cg_convert('newsletter signup'); }); });
</script>


Tracking conversion with additional information

In case you require additional information for your conversion events such as conversion value or another identifier you can easily add a conversion comment:

<script type="text/javascript">
(function(){ cg_convert('your comment here'); })();
</script>