> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gravity Forms form tracking

> Set up Gravity Forms form tracking: add the Cometly pixel to your form so Cometly captures each lead's name, email and phone and ties it to an ad.

Gravity Forms form tracking means adding the Cometly pixel (the tracking script you install on your site) to your Gravity Forms form. With the pixel in the form, Cometly captures form fields such as email address and name as your visitors fill them in.

The email address is what Cometly uses to recognize a lead. Once it is captured, you can see which ad or channel brought that person to your form, and later events (the actions Cometly tracks, such as a lead or a purchase) with the same email are credited to the same source.

## Before you start

Copy your Cometly pixel. In Cometly, go to **Setup** > **Install the Cometly pixel**, find **Install the pixel** and click **Copy Code**. See [Install the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md) for the full walkthrough.

## Add the pixel to your Gravity Forms form

**1. Open the form**

Log in to your WordPress dashboard and go to **Forms**. Select the form you want to edit (or create a new one), then click the form name to open the form editor.

**2. Add an HTML field at the top of the form**

In the **Form Fields** panel on the right, find the **HTML** field type (typically under **Standard Fields**). Drag the HTML field to the top of your form. This is where the Cometly pixel goes.

**3. Paste the Cometly pixel**

Click the new HTML field to open its **Field Settings**. In the **Content** box, paste your Cometly pixel code.

**4. Save the form**

Click **Save Form** (or **Update**) to publish your changes.

> [!WARNING]
>
> Place the HTML block **above** every other field in your form so the pixel loads first.

## Test form tracking

1. Open the page or post where your Gravity Forms form is embedded.
2. Use the [Cometly Pixel Helper](https://docs.cometly.com/guides/tracking/pixel-helper.md) (a browser extension) to check that the pixel fires when the page loads.
3. Fill out the form (at least the email address field) and check that the Cometly Pixel Helper shows the field being captured automatically.

## Check it worked

With a session running in the Cometly Pixel Helper, you see an **Init** event when the page with your form loads, and the name, email and phone details you type into the form appear in the extension.

## Send Gravity Forms submissions to Cometly as events

Adding the pixel to your form captures page views and field inputs. To also send form submissions to Cometly as events, follow the Gravity Forms integration guide, which covers webhooks and Zapier:

[Set up the Gravity Forms integration](https://docs.cometly.com/integrations/platforms/gravity-forms.md)

## Frequently asked questions

### Which Gravity Forms fields does Cometly capture?

Cometly captures the full name, first name, last name, email address and phone number fields. Email is the most important one, because Cometly uses it to connect each lead to the right contact and source.

### Does a visitor have to submit the Gravity Forms form for Cometly to capture their details?

No. The pixel captures form data in real time as visitors type, even before they submit the form. To record the submission itself as an event, set up the [Gravity Forms integration](https://docs.cometly.com/integrations/platforms/gravity-forms.md).

### Can I test Gravity Forms form tracking without the Chrome extension?

Yes. In Cometly, go to **Setup** > **Install the Cometly pixel** and use **Test form tracking** to open your page and type into the form. See [Test form tracking](https://docs.cometly.com/guides/form-tracking/testing.md) for the steps.

## Next steps

* [Send Gravity Forms submissions to Cometly as events](https://docs.cometly.com/integrations/platforms/gravity-forms.md)
* [Test form tracking on a page](https://docs.cometly.com/guides/form-tracking/testing.md)
* [How form tracking works](https://docs.cometly.com/getting-started/form-tracking.md)
* [Troubleshoot form tracking](https://docs.cometly.com/support/troubleshooting/form-tracking/troubleshooting-form-tracking.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.