How do I add conversion tracking codes?

If you're on our Startup and above plan you can add your own conversion tracking code to the checkout success page.

Which looks something like this...

Subbly Checkout Success

1. To add your own code simply go to the marketing navigation item.

2. Click "Tracking Codes"

3. Paste your tracking code.

4. Click save, and you're done!

How do I add product price or ID to my tracking code?

You may want to track the value of each conversion. This is pretty easy with a little javascript know-how. We're going to us the Facebook conversion pixel code as an example.

Example: Facebook

Here is the Facebook conversion tracking javascript code.

(function() {
	var _fbq = window._fbq || (window._fbq = []);
	if (!_fbq.loaded) {
		var fbds = document.createElement('script');
		fbds.async = true;
		fbds.src = '//';
		var s = document.getElementsByTagName('script')[0];
		s.parentNode.insertBefore(fbds, s);
		_fbq.loaded = true;
window._fbq = window._fbq || [];
window._fbq.push(['track', 'YOURIDHERE', {'value':'0.00','currency':'USD'}]);

The important part here is in the last line where it says {'value':'0.00','currency':'USD'}, we're going to add our own javascript variable here to pass the product / subscription price.

Available Variables in Javascript

We can access any of the following object variables in javascript which we make available on the checkout success page:

var product = {
	'id': 999,
	'price' : 0.00,
	'name': "Product name",

So now we can use these in our Facebook tracking code like so... This is just the last line from the above Facebook tracking code.

Putting It Together

window._fbq.push(['track', 'YOURIDHERE', {'value': product.price,'currency':'USD'}]);