# Connect Facebook Pixels with non Hosted website

**URL:** <https://community.hubspot.com/t/connect-facebook-pixels-with-non-hosted-website/7168>\
**Category:** Ads\
**Created:** [January 16, 2018, 6:17pm UTC](https://community.hubspot.com/t/connect-facebook-pixels-with-non-hosted-website/7168 "2018-01-16T18:17:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RonyAlmdz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ronyalmdz/32/99782_2.png) [@RonyAlmdz](https://community.hubspot.com/u/RonyAlmdz)\
**Post date:** [January 16, 2018, 6:17pm UTC](https://community.hubspot.com/t/connect-facebook-pixels-with-non-hosted-website/7168/1 "2018-01-16T18:17:07Z")

</div>

Hi, I have the next question:

How can I connect my existing Facebook pixel id to track it with HubSpot, my website is not hosted in Hubspot and 've already put my FbPixel script in my websites footer?

---

<div class="post-metadata">

**Author:** ![roisinkirby](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@roisinkirby](https://community.hubspot.com/u/roisinkirby)\
**Post date:** [January 29, 2018, 2:25pm UTC](https://community.hubspot.com/t/connect-facebook-pixels-with-non-hosted-website/7168/2 "2018-01-29T14:25:09Z")

</div>

Hello @RonyAlmdz you will need to use the tracking pixel generated in your conten settings for any tracking to work.

The steps below walk through installing the Facebook pixel base code in your content settings and the Facebook event code on your pages.

### 1. Install the Facebook pixel base code

- In your HubSpot _ **Marketing** _ account, navigate to **Content** \> **Content Settings**.
- Scroll to the _Site Header HTML_ section and paste the Facebook pixel base code. Do not include the _\<nonscript\>_ portion of the pixel code here.

 ![header-fb-pixel.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/b/1ba7c8868d8a946645eff89ee93f60517ffbde0a.png)

- In the _Site_ _Footer HTML_ section, paste the _\<nonscript\>_ portion of the pixel code.

**Please note** : the _\<nonscript\>_ section at the end of your Facebook pixel code must be pasted into the footer HTML to avoid invalid HTML from being generated on the page.

- Click **Save changes** at the bottom.
- Once the code has been added, check that your pixel is working by navigating to the _Pixels_ tab in your Facebook Ads Manager, then clicking **Send Test Traffic**. If your status reads _Active_, your base code has been installed correctly. This can take several minutes to update.

 ![facebook-pixel-send-test-traffic.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/d/edb147c97754798dc92a2ff688084ca6daacb042.png)

### 2. Install the Facebook event code on your page

- In your HubSpot _ **Marketing** _ account, navigate to **Content** \> **Landing Pages** or **Website Pages**.
- Locate and hover over the page in the dashboard and click **Edit**. The Facebook event code should be added to the final page of your offer, which is usually your thank you page.
- Click the **Settings** tab and scroll down to _Advanced Options_, then click **Edit**  **Footer HTML**.

 ![|640](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/7/9794a6ef8ce17f4a29340d8e72c44dfaf6327540.png)

- Paste the Facebook event code in the dialog box that appears, then click **Save changes**.

 ![footer-html-facebook-event-code.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/7/4763dab63fcd00454b80a8331562745c6f4ac8a0.png)

- Click **Update** or **Publish** in the upper right corner of the page editor.

**Please note:** in most instances, this code will conflict with other code on your page when added to the _Head HTML_. In order for it to fire correctly, please be sure to add the Facebook event code to the _Footer HTML_.
