Track conversions in ClickFunnels


Use this setup to track ClickFunnels conversions with Convert using a webhook, since you can't add any snippets to their conversion pages.

Setup Instructions

First, add hidden fields to your ClickFunnels form with the following name:

  • input-cid
  • input-pid
  • input-vid
  • input-goals
  • input-vars
  • input-exps
  • input-defaultsegments

Then add the following code to your Convert > Project > Configuration > Global Javascript section. Change:

  1. The URL where the form is located. This requires for the Convert snippet to be added to the form. 
  2. The conversion goal id. You should get the id from the goal that you have created to track the conversion.
  3. The selectors for the input elements for the hidden fields you created on your ClickFunnels form. The selectors to replace are formatted with bold format on the code.
document.addEventListener('DOMContentLoaded', function(event) {
// Check if the current URL is ''
if (window.location.href === '') {
let session_cookie = convert.getCookie('_conv_s');

if ((JSON.stringify(convert.currentData.experiments) !== '{}' ||
JSON.stringify(convert.historicalData.experiments) !== '{}') &&
session_cookie) {

let conversion_goal_id = '100232282';
let session_id = session_cookie.substring(
session_cookie.lastIndexOf('sh:') + 3,

let exp_list = [];
let variation_list = [];
let varID;

const processExperiments = (experiments) => {
for (let expID in experiments) {
varID = experiments[expID].variation_id;

if (!exp_list.includes([expID].id)) {

'Adding experiment: ' +[expID].id +
':' +

if (convert.currentData) {

if (convert.historicalData) {

// Replace the corresponding selectors to the input element for the hidden fields that you added
document.getElementById("input-96249").firstElementChild.setAttribute('value', session_id);
document.getElementById("input-91627").firstElementChild.setAttribute('value', conversion_goal_id);
document.getElementById("input-74759").firstElementChild.setAttribute('value', variation_list);
document.getElementById("input-18985").firstElementChild.setAttribute('value', exp_list);
document.getElementById("input-38478").firstElementChild.setAttribute('value', JSON.stringify(convert.getDefaultSegments()));

Then create two webhooks on ClickFunnels triggered when the transaction or contact creation occurs. These webhooks should set of type JSON on the ClickFunnels interface.

The endpoints for the webhooks should be:

Alternatively, you can create a webhook directed to Zapier and relay the conversion from there.


  • Make sure that the input fields are filled with the data when the form is rendered. This should include your customer id, project id, and other related fields filled in.Test always in a fresh incognito session.
  • Make sure you are part of the test, before firing the Conversion. Only then will the conversion be shown on the Live Log or the report. You can find out if you are part of a test, if you type convert.currentData.experiments in the console. The returned object should show the id's of the experiment that which you are part of.



Need assistance? Start a conversation with our Support Team.

Reliably Convert More Site Visitors, Even If Everything Else is Changing in Your Business.

✓ No Credit Card  ✓ Easy Set-Up  ✓ Access All Features