Skip to main content
The Cometly pixel is a small script you add to your website. It tracks where your website visitors come from and captures opt-in data from your forms (name, email and phone number). When you install the Cometly pixel, Cometly can tie each lead and sale back to the ad or channel that brought the visitor in. Without it, Cometly has no record of the visit, so this is the step the rest of your tracking depends on.

Before you start

  • Place the pixel on every website or domain you want to track: your main domain (for example cometly.com) and any subdomains (go.cometly.com, blog.cometly.com, academy.cometly.com and so on).
  • The pixel goes in the <head> section of every site you want to track, so you need to be able to edit your site’s code or its header settings.
  • Verification opens your website in a pop-up window, so allow pop-ups from Cometly in your browser.
If you are a SaaS company, see the SaaS pixel setup guide.

Open the pixel step

In the left sidebar, click Setup, then open step 2, Install the Cometly pixel. The step has five numbered parts: Add domains, Pixel options, Install the pixel, Verify your pixel and Test form tracking.
Setup page on the Setup tab with step 2, Install the Cometly pixel, boxed in the left step list and the step's Add domains and Pixel options parts on the right

Add your domains

Under Add domains, add each domain and subdomain where you will place the pixel.
  1. Open your website in a browser and check whether the address includes www. when the page loads.
    • If it does, include www. when you add the domain (for example www.yourdomain.com).
    • If it does not, leave www. out (for example yourdomain.com).
  2. Enter the domain and click Add Domain.

Install the pixel

Under Install the pixel, click Copy Code and paste the script into the <head> section of your website (or websites). For platform-specific instructions, see pixel installation by platform.
The script changes when you add or remove domains, or change a setting under Pixel options. If Cometly tells you your tracking script has changed, copy it again and replace the old one on your website.

Verify the pixel

  1. Under Verify your pixel, click Verify next to a domain.
  2. A dialog explains that Cometly will open your website in a pop-up window and check whether the pixel is installed. This usually takes a few seconds. Do not close the pop-up until the check is finished.
  3. Optional: to check one page instead of the home page, expand Test a specific page and enter the page path. SaaS companies that only add the pixel to their login and registration pages typically use this.
  4. Click Verify in the dialog.
Each domain then shows one of these results:

Verify an app domain (SaaS)

When you verify an app domain (like app.cometly.com), enter the path of the page you land on after logging in. If you are already logged in, opening app.cometly.com redirects you straight to a page such as https://app.cometly.com/dashboard. If you leave the path empty, Cometly cannot match the redirect, so the verification fails. To fix it, expand Test a specific page in the verification dialog and enter the path you land on after login. Example:
  • You are verifying app.cometly.com.
  • After login, the site redirects you to https://app.cometly.com/dashboard.
  • In the path field, enter dashboard (only the path, not the full URL).
  • Click Verify.

If verification fails

See the troubleshooting section below, or the pixel troubleshooting guides.

Automatic cross-domain tracking

Example: if traffic flows from cometly.com to app.cometly.com, cross-domain tracking makes sure the visitor is tracked as the same person on both domains. SaaS companies with a separate app domain need it. Under Pixel options, turn on Automatic Cross Domain Tracking. You need at least one domain under Add domains before you can turn it on. Once it is on, your domains use the comet_token to recognize the same visitor on each of them. There are two ways to set up cross-domain tracking: automatic (recommended) and manual. Both are covered in Cross-domain tracking.

Use the Cometly Pixel Helper (Chrome extension)

The Cometly Pixel Helper is a Chrome browser extension that helps you check that Cometly is installed correctly on your website. It helps with two things:
  1. Checking for errors in your pixel installation.
  2. Showing the Cometly events that load on your page, and confirming that the pixel captures data from your opt-in forms.
Learn how to install the Cometly Pixel Helper

Check it worked

Under Verify your pixel, each domain you installed the pixel on shows Pixel detected. Once at least one domain is verified, step 2 of Setup counts as complete, and the Pixel Installed check on the Tracking Health tab of Setup passes.

Troubleshoot common installation issues

The Setup page loads blank

If the page for installing and verifying the pixel appears blank, it is usually a browser issue. Clear your browser cache and cookies for app.cometly.com, then refresh the page. See Clear cookies and cache.

The pixel script on your website is incorrect

If the script on your website is not the one Cometly shows for your space, tracking and integrations will not work properly. To fix it:
  1. Replace the script on your website with the one shown in Setup under Install the pixel.
  2. Make sure the script is in the <head> section of your website’s code.
By default, a correct pixel script looks like this:
If you use a first-party tracking domain or a pinned script version, the tag has a different host or extra attributes. Always copy the script from Setup instead of typing it.

Frequently asked questions

Can I install the Cometly pixel with Google Tag Manager?

Yes, the pixel works when it is installed through Google Tag Manager, but you may lose attribution data because of loading delays and privacy blockers. Placing the pixel directly in the <head> section of your website is the recommended setup. Do not do both: a pixel that is hard coded and also added through Google Tag Manager loads twice and causes tracking issues. See Google Tag Manager pixel installation.

How do I check that the Cometly pixel is capturing my forms?

Use Test form tracking, the last part of the same Setup step. It opens a page of your site in a pop-up window and tells you whether Cometly can see the forms on it and their email field. See Test form tracking.

What is First Party Domain Tracking, and do I need it?

First Party Domain Tracking is an optional setting under Pixel options that serves the pixel from a subdomain you control instead of js.comet-serve.com. Ad blockers are less likely to block a script served from your own domain, so fewer events are lost. The default script keeps working while you set it up. See Set up First Party Domain Tracking.

Next steps

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