Conversions
Track valuable user actions like form submissions and downloads by sending conversion events directly from the browser.
A conversion is any action a user takes that has value for your business, such as filling out a form, downloading a whitepaper, requesting a demo, or signing up for a newsletter. The Conversions endpoint allows you to track these events by sending conversion data to Oktopost directly from the user's browser without requiring external tracking codes.
This is a JavaScript-based tracking endpoint designed for browser implementation.
Endpoint
https://okt.to/c/{ACCOUNT_ID}/globalParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| tag | String | Yes | The conversion type's name. |
| value | Number | No | The monetary value of the conversion. |
| firstName | String | No | The lead's first name. |
| lastName | String | No | The lead's last name. |
| String | No | The lead's email address. | |
| company | String | No | The lead's company name. |
| country | String | No | The lead's country. |
| state | String | No | The lead's state or region. |
| city | String | No | The lead's city. |
Sending a conversion event to Oktopost without personal information will create an anonymous conversion.
JavaScript Example
This example sends a named conversion event to Oktopost.
var myLead = {
tag: 'Example',
value: 100.00,
firstName: 'John',
lastName: 'Doe',
email: 'john@ibm.com',
company: 'IBM',
country: 'US',
state: 'NY',
city: 'New York',
zip: '123456',
ts: Date.now() // For cache busting
};
var baseURL = 'https://okt.to/c/{ACCOUNT_ID}/global'; // replace {ACCOUNT_ID} with your account ID.
var img = new Image;
img.src = baseURL + '?' + $.param(myLead); // Loads the conversion pixel with the lead data in the query parameters.