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

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

No way to install the tracking code before conversion code (e.g. in platforms like Shopify)? Read about how to do it here.

Why should you track conversion events?

By having ClickGUARD track conversion you can get notified or block visitors that shop around and 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 in-page JavaScript code, after page load.

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

<script type="text/javascript">
$(function(){ docgetElementbyidntbyId('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 when calling the cg_convert() function:

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