How to Track Conversion on Pardot Forms

If you're using Pardot Forms and embed them directly on your site, you will need to use the method described here in order to track named conversions with Oktopost.

First, you will need to set up the Thank You Content, without this you will not be able to embed the Oktopost Tracking Code. Once the Thank You Content is ready, copy the tracking code from your account and paste it into the text box.

Next, add the following code snippet right after the _oktrk('create') function call.

_oktrk('send', {
	tag: 'TAG_NAME',
	email: '%%email{js}%%',
	firstName: '%%first_name{js}%%',
	lastName: '%%last_name{js}%%'
});

This will send the named conversion data to Oktopost. Make sure to replace the TAG_NAME with the desired conversion type.

The final code snippet should look something like this:

<script>
(function(a, b, c, d, e, m) {
	a['OktopostTrackerObject'] = d;
	a[d] = a[d] || function() {
		(a[d].q = a[d].q || []).push(arguments);
	};
	e = b.createElement('script');
	m = b.getElementsByTagName('script')[0];
	e.async = 1;
	e.src = ('https:' === document.location.protocol ? 'https://' : 'http://') + c;
	m.parentNode.insertBefore(e, m);
})(window, document, 'static.oktopost.com/oktrk.js', '_oktrk');

_oktrk('create', 'OKTOPOST_ACCOUNT_ID');
_oktrk('send', {
	tag: 'TAG_NAME',
	email: '%%email{js}%%',
	firstName: '%%first_name{js}%%',
	lastName: '%%last_name{js}%%'
});
</script>

Feedback and Knowledge Base