Skip to content

Content Conversions: Self-managed setup and configuration

Take care when configuring conversion events – once they’re sent, they’ll appear in the reporting suite, and we cannot remove that data. We recommend implementing on a testing site first.

Conversion types Conversions currently supports five standard conversion types and one custom type:

  1. Subscription – When a user buys a subscription that will result in recurring revenue.
  2. Newsletter Signup – When a user provides their email via a form in order to receive emails from a company, such as a newsletter or an email course.
  3. Lead Capture – When a user provides identifying details (e.g. email, name) via a form to indicate they have interest in what the company is selling (i.e. a lead).
  4. Link Click – When a user clicks a link or button (e.g. an internal link or affiliate link).
  5. Purchase – When a user completes the one-time purchase of a product.

Note: In the future, may provide benchmark comparisons of the standard categories of events (e.g. comparing how your newsletter signup performance compares to rest of the network). For this reason, we discourage using custom types except when absolutely necessary.

Conversion actions

For conversions, there are five categories of conversion events, plus custom events: Each conversion action is a combination of two identifying attributes:

  • Type – The category of the conversion listed in the section above. supports six types, which you can choose from.
  • Label – The name of the specific action taken by a user (described in the parameter). You have the freedom to customize and specify the label. Forward slashes (/) are not supported in conversion labels. If used, the conversion details page for those labels will be inaccessible.

Important requirements:

1. You must be able to put tracking on pages or forms where conversions occur and on any pages that users view on their way to converting.

2. All pages must have valid metadata provided to

Sending a conversion event with a label

When a conversion event is triggered, call PARSELY.conversions.<relevant function name> to send the data to’s servers. Each function takes one parameter, which is a descriptive label for the conversion event. Labels may appear in the reporting suite, so spaces and capitalization are supported.

PARSELY.conversions.trackLeadCapture('Demo Request');
labelstringyesA string specific to a particular implementation

Note that the PARSELY.conversions.<track functions> functions are available only after the tracker code has finished loading. To capture conversion events that may occur before the tracker loads, continue to the next section. Also note that the label should be a static value, like the above suggested 'Demo Request'. Using a variable that resolves to different values with each submission will result in noisy, non-aggregated tracking that may detract from the value of Conversions.

Handling conversions whenever they occur

Because it’s possible for a conversion event to happen before the tracker has fully loaded, it’s recommended to use a wrapper function (captureParselyLeadConversion in the example below), rather than calling a method which may not yet exist. Using the example of a lead capture from above, you might have something like this on a lead-gen page:

// make a queue for conversion events
var parselyConversionEventQueue = [];
// wrapper function safely handles either case
function captureParselyLeadConversion(label) {
  if (window.PARSELY && window.PARSELY.loaded) {
  } else {
// run this safely whenever you capture an event
captureParselyLeadConversion('Demo Request');
// flush the queue when the tracker loads
window.PARSELY = window.PARSELY || {
  onload: function() {
    for (var i = 0; i < parselyConversionEventQueue.length; i++) {
// insert the parsely tracker code here...


Any code that sets PARSELY.onload (such as the example above) must be executed before the loading tracker.

Sample Implementations

The following examples are necessarily simplified for illustration purposes, and are not meant to be used as-is.

Lead Capture conversion example

Use trackLeadCapture when a user provides identifying details (e.g. email, name) via a form to indicate they have interest in what the company is selling.

Some examples include:

  • Signing up for a demo
  • Creating an account to start a 30-day trial
  • Signing up for a rewards program

In this example, generated leads are also distinguished by their “active” status.

// listen for submit events on a form, to indicate a lead capture
var form = document.getElementById('demo-request-form');
form.addEventListener('submit', function(){PARSELY.conversions.trackLeadCapture('Demo Request')}, false);
// Alternately, you might want to distinguish leads who were already active users...
function trackParselyActiveLead(e) {
  // determine if the user is active based on the session count
  var userSessionCount = PARSELY.lastRequest.sid;
  var userStatus = userSessionCount > 5 ? "active" : "new";
form.addEventListener('submit', trackParselyActiveLead, false);

Newsletter signup conversion example

Use trackNewsletterSignup when a user submits their email address via a form to subscribe to a newsletter or other email program.

// listen for click events on a button which indicates a newsletter signup
var btn = document.getElementById('newsletter-signup-button');
btn.addEventListener('click', function(){PARSELY.conversions.trackNewsletterSignup('Politics Newsletter Sign Up')}, false);

Subscription conversion example

Use trackSubscription when a user buys a subscription product that will result in recurring revenue. (For one-time purchases, use trackPurchase.)

Some examples include:

  • a software subscription
  • a monthly/weekly subscription box
  • a content subscription (e.g. for a streaming service, a newspaper)
  • a recurring donation

Here, a monthly subscription to a beauty box is tracked.

var form = document.getElementById('glam-box-subscribe');
form.addEventListener('submit', function(){PARSELY.conversions.trackSubscription('Glam Box Monthly Subscription')}, false);

Purchase conversion example

Use trackPurchase when a user makes a one-time purchase of a product. (For purchases that result in recurring revenue, use trackSubscription.)

Some examples include:

  • buying a ticket to an event
  • buying a pair of shoes
  • making a one-time donation

Instead of a monthly subscription, this example tracks a one-time purchase of a pair of shoes.

var form = document.getElementById('men-sneaker-id-5436-purchase');
form.addEventListener('submit', function(){PARSELY.conversions.trackPurchase("Men's Sneaker Id 5436")}, false);

Use trackLinkClick when a user clicks a link (in-line, button, banner, etc).

Some examples include:

  • when a user clicks a call-to-action (such as a Subscribe button or a product recommendation). This can indicate intent, even if the user doesn’t complete the intended action (e.g. clicking a Subscribe button, but not completing payment for the subscription).
  • when a user clicks an affiliate link
  • when a user clicks from a blog post to landing page
  • when a user clicks a social share button

In this example, sometimes we want to send a generic label when the link matches some domain; otherwise, we might want to track the entire link itself.

var ecomDomain = "";
function parselyLinkClickConversionCallback(e) {
  if ( === 'A'
    && !== -1
  ) {
    // Can inspect the events to send custom labels
    // for specific events...
    PARSELY.conversions.trackLinkClick('E-commerce Link Click');
  } else {
    // ... or simply send the link that was clicked.
document.addEventListener('click', parselyLinkClickConversionCallback, false);

A warning note on iframes

Tracking conversions in iframes is only possible if the tracker can be placed in the iframe. This requires developer work to add our tracker to the page, and also set PARSELY.autotrack = false, in addition to calling relevant tracker methods.

  window.PARSELY = window.PARSELY || {
    autotrack: false,
    onload: function() {
      // add event listeners or other logic
<!-- START Include -->
<!-- ... as above ... -->
<!-- END Include -->

Last updated: November 24, 2023