Skip to main content
Act-On Software

Setting Up Conversion Tracking and Lead Capture

AUDIENCE: Administrators, Marketing Users
OBJECTIVES:

A conversion is any action a user takes that has value for your business, it can be anything from filling out a web-form to downloading a white-paper. With a simple setup, the Advanced Social Media Module not only allows you track conversions that originate from social interactions, but also attribute these conversions to actual contact details.

To get started, you will need to embed the tracking code on your website and create the various conversion types you want to track.

Installing the Tracking Code

The tracking code can be found under the Account Settings tab in your account. To embed it on your website, simply copy and paste the code into every webpage you want to track just before the closingtag of the website template.

Installing the Tracking Code for Act-On Forms

In Classic Forms the Advanced Social Media tracking code was added to the 'External Web Analytics Support' section of the Settings page. Changes in the way our new Forms our embedded (as a Javascript snippet rather than an iframe) require new methods for targeting a form with additional JavaScript.

Because JavaScript is a serialized language (meaning it is executed line by line, from top to bottom by the browser), we need to ensure that any script targeting the form is only evaluated after the form has fully loaded. To accomplish this, we will wrap any additional script in a callback function signifying that the form has been loaded so that everything is executing in the right order.

Screen Shot 2018-03-13 at 4.43.15 PM.png

The aoPostLoadCallback function looks like this: 

<script>  

aoPostLoadCallback = function(){  

//run the script you want to target the form here  

};  

</script> 

  • If you are using your Forms with Act-On Landing Pages this callback can be added, along with your script, in the 'Edit JavaScript' section in the Design tab of the Landing Page Composer.

Example with Advanced Social Media script:

<script>  

aoPostLoadCallback = function(){  

(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', '001cwoyyjytro14');

};  

</script> 

If you are using your Forms with external pages the same script can be added anywhere on that webpage.

Once the tracking code is placed on your website you can start creating the different types of conversions. There are two types that the Advanced Social Media Module allows you to track:

 
Type Description
Destination When a user reaches a specified webpage on your website e.g. /thankyou.html
Event When a user conducts a specified action, like viewing a video

 

To create a new conversion type, simply head over to Account Settings → Conversions and create a new conversion type. For each type you will need to define:

  • Name: Used to segment conversions in your account analytics
  • Destination: Used to determine when and how a conversion is triggered
  • Value: Used to assign a monetary value to the conversion

To define a conversion that occurs when a user reaches a certain webpage, you can use one of the following destination types:

 
Type Description
Begins with Webpage URL begins with the specified value
Equals to Webpage URL equals to the specified value
Contains Webpage URL contains the specified value

 

Please note that your domain name should not be included in the destination value.

To define a conversion for events you will need to use the JavaScript API made available with the tracking code. This option is particularly useful when the action occurs without the user leaving the webpage or when the target URL cannot be described using the standard destination types.

In the following example, the JavaScript code snippet will send a new conversion to the Advanced Social Media Module with the name Example. If this conversion type is not already setup, the Advanced Social Media Module will create one automatically with the destination type set to None.

_oktrk('send', {
tag: 'Example'
});

In most cases conversions correlate to filling web-forms. The tracking code will always try to capture information users leave on your web-forms and sync it with Act-On once a conversion is triggered, resulting in named conversions.

Lead data can also be sent programmatically along with the conversion type using the JavaScript API, for example:

_oktrk('send', {
tag: 'Example',
value: 100.00,
firstName: 'John',
lastName: 'Doe',
email: 'john@ibm.com',
company: 'IBM',
country: 'US',
state: 'NY',
city: 'New York',
zip: '123456'
});
  • Was this article helpful?