> For the complete documentation index, see [llms.txt](https://support.agentfire.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.agentfire.com/faqs-and-general/common-questions/articles-1505060-how-to-set-up-conversion-tracking.md).

# How to Track Website Leads as Ad Conversions

Count website leads as conversions in Google Ads or Meta: add your tag once, send form leads to a thank-you page, and count visits to that page.

A conversion is a lead your ads get credit for. The simplest way to count one is to send everyone who fills in a form to a **thank-you page**, then tell your ad account that each visit to that page is a lead.

## 1. Add your tracking tag to every page

Click the menu icon at the top left, then **Site Settings** > **AgentFire Settings** > **Header/Footer Scripts & Metas**.

| Code                                        | Box to paste it in                                                                                  |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Google tag (Google Ads or Google Analytics) | **Head first**                                                                                      |
| Google Tag Manager, main part               | **Head first**                                                                                      |
| Google Tag Manager, `<noscript>` part       | **Body before closing tag**                                                                         |
| Meta (Facebook) Pixel, main part            | **Head first** ([steps](/integrations/facebook/articles-1505057-how-to-set-up-a-facebook-pixel.md)) |
| Meta (Facebook) Pixel, `<noscript>` part    | **Body before closing tag** (pasting it into Head first gives a "tag not allowed" error)            |

If your site has a cookie banner, set these boxes to **Analytics & Marketing**. Full list: [Where each script goes](/faqs-and-general/common-questions/articles-cookie-banner.md#where-each-script-goes).

Click **Update** to save. You only do this once, and it covers your whole website.

## 2. Send form leads to a thank-you page

{% stepper %}
{% step %}

### Open the form's settings

Open the page with the form in the editor. Point at the form and click the pencil next to **Lead Form**, then open **Form Settings**.
{% endstep %}

{% step %}

### Set the redirect

Under **Submit Action**, set **Lead Form Submit Action** to **Redirect to new URL**. In **Redirect URL**, enter your thank-you page, for example `/thank-you/`. Then click **Save** at the top right.

![The Submit Action settings with Redirect to new URL and a Redirect URL of /thank-you/](https://2039430885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq65vhH2v4k5rpDOha9Vm%2Fuploads%2Fgit-blob-1cdf32934366f3f8ac2b7491995ebced43736928%2Fconv-1-redirect.png?alt=media)
{% endstep %}
{% endstepper %}

Do this for each form you want to count. Your contact form may already be set this way, so check the **Redirect URL** before changing anything.

## 3. Count visits to the thank-you page

{% tabs %}
{% tab title="Google Ads" %}
In Google Ads, create a website conversion action for a lead and choose to count it by **page URL**. Use a rule like "URL contains `/thank-you/`". Google's steps: [Set up conversions for your website](https://support.google.com/google-ads/answer/16560108).

This works with the Google tag from step 1, so you don't need to paste any extra code on your website.
{% endtab %}

{% tab title="Meta (Facebook)" %}
Add a **Lead** event to your thank-you page. See [Track leads on a thank-you page](/integrations/facebook/articles-1505057-how-to-set-up-a-facebook-pixel.md#track-leads-on-a-thank-you-page-optional).
{% endtab %}
{% endtabs %}

## Check that it works

Fill in your own form, check that you land on the thank-you page, and use Google's **Tag Assistant** or Meta Pixel Helper to see the tag fire. Google says new or fixed conversions can take up to 48 hours to show as active in Google Ads.

## Common Questions

<details>

<summary>Google Ads says my tag isn't detected, but Google Analytics works.</summary>

Your site may only have the Google Analytics tag. Google Ads needs its own tag ID connected. You can add the Google Ads tag ID to the same Google tag in Google, or paste the Google Ads tag into **Head first**. Don't remove the tag that's already there unless you're replacing it.

</details>

<details>

<summary>Google gave me a conversion code to paste on one page. Where does it go?</summary>

Using a page URL rule (step 3) avoids pasting code on one page. If you need the code on a single page, email <support@agentfire.com> with the code and the page.

</details>

<details>

<summary>Can you track IDX sign-ups as conversions?</summary>

Sign-ups on IDX listing pages don't go to a thank-you page, so a page URL rule can't count them. Email <support@agentfire.com> and we'll check what's possible for your IDX.

</details>

<details>

<summary>Can you track phone calls from my website?</summary>

Google can count clicks on your phone number or calls through a Google forwarding number. Both need extra setup in Google Ads. Email <support@agentfire.com> with what Google asks you to add.

</details>

<details>

<summary>Can you install the tags for me?</summary>

Yes. Email <support@agentfire.com> with the code or tag ID from Google or Meta.

</details>
