Skip to main content
This guide shows you how to track ClickFunnels Stripe purchases in Cometly. When Stripe takes the payment on your funnel, the Cometly pixel cannot capture the email address from the Stripe form (the pixel is the tracking script on your pages). You close that gap with a hidden comet_token field on your form: the comet_token is the identifier that links a visitor’s browser session to their attribution data. Without it, Cometly cannot link the purchase event (the conversion ClickFunnels sends) back to the visitor. With it, the comet_token is included in the payload when ClickFunnels sends the purchase event, so you can see which ad or channel produced each Stripe sale. In all other cases, Cometly tracks ClickFunnels forms automatically.
This solution works for ClickFunnels only, not ClickFunnels Classic.

Before you start

Step 1: Add a custom input field

  1. In the ClickFunnels editor, hover your mouse under the last form field and click Add Element.
    ClickFunnels editor with the Add Element button under the last form field
  2. In the Form section, click Input.
    ClickFunnels elements panel with the Form section and the Input element highlighted
  3. Set Input Type to Custom Type.
  4. Enter comet_token into the Custom Type field. Spell it exactly like this: all lowercase, with an underscore.
  5. Set Required to Not Required. This prevents submission issues if the pixel is blocked.
    ClickFunnels input settings with Custom Type, comet_token and Not Required selected

Step 2: Add a custom attribute

  1. Select the comet_token input field.
  2. Go to Advanced → Logic → Custom Attributes.
    ClickFunnels input Advanced tab, Logic section, with Add Custom Attribute highlighted
  3. Click Add Custom Attribute, enter the following and click Save:
    • Name: data-hidden
    • Value: true
    ClickFunnels New custom attribute dialog with data-hidden and true entered

Step 3: Add the custom script

Next, add a script to your funnel page that hides the comet_token field:
  1. Open the page editor.
  2. Go to Settings → Custom Code → Footer Code.
    ClickFunnels page editor with the settings menu, the code option and the Footer Code tab highlighted
  3. Paste in this script:
    The script hides any field with the data-hidden="true" attribute, which turns the comet_token field into a hidden field.
  4. Save the page.

Step 4: Map the comet_token to your Purchase event in Cometly

Once this setup is complete, the comet_token is included in the payload when ClickFunnels sends the purchase event. Map it in Cometly:
  1. In Cometly, go to Events Manager.
  2. Find your ClickFunnels Purchase event and click Edit (or Configure if the event is still a draft).
  3. Open the Configure Mapping step and click Add Field.
  4. Under Cometly Fields, choose Comet Token. Under Data Fields, select the comet_token field from the ClickFunnels payload.
  5. Click Save & Continue and finish the remaining step.
Cometly can now connect each Stripe purchase to the visitor’s journey.

Check it worked

Complete a test purchase on your funnel. In Cometly, the data ClickFunnels sends for your Purchase event now includes the comet_token field with a value, and it is mapped to Comet Token.

Why this works

  • The comet_token is captured even though Stripe blocks email capture.
  • The custom attribute and the script hide the field from the visitor but keep it working.
  • Mapping the comet_token in Cometly links every Stripe purchase event back to the visitor’s funnel activity.
  • Setting the field to Not Required prevents form errors if the comet_token can’t be generated.
If you use multiple Stripe funnels, repeat this setup in each funnel so that all Stripe purchases are tracked accurately.

Frequently asked questions

What is the comet_token in Cometly?

The comet_token is a unique identifier created by the Cometly pixel. It links a visitor’s browser session to their attribution data, so an event that arrives with it can be matched to that visitor even without an email address. The Cometly pixel must be installed on the page for it to exist.

Why can’t I find the comet_token field when I map my ClickFunnels Purchase event?

Cometly lists the fields from the data ClickFunnels has already sent. Purchases made before you added the field to your form do not contain it. Complete a new purchase on the funnel after you save the page, then map the field from that record.

Next steps

Still have questions or need a hand? We’re happy to help. Reach our team at support@cometly.com.