> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.weblium.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Connecting Facebook Pixel

[The Facebook pixel](https://www.facebook.com/micro_site/url/?click_from_context_menu=true&country=UA&destination=https%3A%2F%2Fwww.facebook.com%2Fads%2Fmanager%2Fpixel%2Ffacebook_pixel&event_type=click&last_nav_impression_id=0NojKCTiO26fqHszn&max_percent_page_viewed=25&max_viewport_height_px=610&max_viewport_width_px=1280&orig_http_referrer=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fhelp%2F952192354843755%3Fid%3D1205376682832142&orig_request_uri=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fhelp%2F952192354843755%3Fid%3D1205376682832142&primary_cmsid=952192354843755&primary_content_locale=en_GB&region=emea&scrolled=false&session_id=2hG5J5immvyuW4AW2&site=fb4b&extra_data[view_type]=v3_initial_view&extra_data[site_section]=help&extra_data[placement]=%2Fbusiness%2Fhelp%2F952192354843755) is a code that collects data to help you track conversions from Facebook ads, optimize ads, build targeted audiences for future promotions, and re-market to people who have already taken some action on your website. 

With the help of our tools, you can integrate your Facebook Pixel to track the activity on the whole site. 

||| ${color}[#f97700](Important:) This feature is available only for Pro sites.

In this article you will learn how to:
* [Connect Facebook Pixel via ID](#1-connecting-via-id)
* [Connect Facebook Pixel via Code](#1-connecting-via-code)
* [Set up events via Events Manager](#1-adding-events-to-your-pixel)

# Connecting via ID

### Step 1. Accessing the Pixel ID

1. For that, open the [Pixels](https://www.facebook.com/micro_site/url/?click_from_context_menu=true&country=UA&destination=https%3A%2F%2Fwww.facebook.com%2Fads%2Fmanager%2Fpixel%2Ffacebook_pixel&event_type=click&last_nav_impression_id=0HQKhvrUyhXq6aUYD&max_percent_page_viewed=33&max_viewport_height_px=610&max_viewport_width_px=1280&orig_http_referrer=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fhelp%2F952192354843755%3Fid%3D1205376682832142&orig_request_uri=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fhelp%2F952192354843755%3Fid%3D1205376682832142&primary_cmsid=952192354843755&primary_content_locale=en_GB&region=emea&scrolled=false&session_id=2hG5J5immvyuW4AW2&site=fb4b&extra_data[view_type]=v3_initial_view&extra_data[site_section]=help&extra_data[placement]=%2Fbusiness%2Fhelp%2F952192354843755) tab in your Events Manager account and create a pixel for your site.

|| ${color}[#ffa800](Note:) Detailed instructions on how to create your pixel can be found in [Facebook Business Help Center](https://www.facebook.com/business/help/952192354843755?id=1205376682832142).

2. Open your Pixel and proceed to the **Settings** tab:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-1_1lfdmru.png)

3. Copy the **Dataset ID** to your clipboard:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-2_1nok48q.png)

|| ${color}[#ffa800](Note:) Your Dataset ID must be unique. The code that is presented on the screenshot above is just an example.

### Step 2. Connecting Facebook Pixel

1. Open the **Settings** of your site and navigate to the **Analytics** tab:

![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/en-analitycs_chvc3m.png)

2. Click on the **Facebook Pixel** tab and paste the requested ID in the corresponding field:

![](https://storage.crisp.chat/users/helpdesk/website/fa84b4d83a50e800/en-pixel_12263bn.png)

3. [Publish your site](/en-us/article/publishing-a-site-tgxmch/) for the changes to appear live.

# Connecting via Code

1. Open the [Pixels](https://www.facebook.com/micro_site/url/?click_from_context_menu=true&country=UA&destination=https%3A%2F%2Fwww.facebook.com%2Fads%2Fmanager%2Fpixel%2Ffacebook_pixel&event_type=click&last_nav_impression_id=0HQKhvrUyhXq6aUYD&max_percent_page_viewed=33&max_viewport_height_px=610&max_viewport_width_px=1280&orig_http_referrer=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fhelp%2F952192354843755%3Fid%3D1205376682832142&orig_request_uri=https%3A%2F%2Fwww.facebook.com%2Fbusiness%2Fhelp%2F952192354843755%3Fid%3D1205376682832142&primary_cmsid=952192354843755&primary_content_locale=en_GB&region=emea&scrolled=false&session_id=2hG5J5immvyuW4AW2&site=fb4b&extra_data[view_type]=v3_initial_view&extra_data[site_section]=help&extra_data[placement]=%2Fbusiness%2Fhelp%2F952192354843755) in your Events Manager account and create a pixel for your account.

|| ${color}[#ffa800](Note:) Detailed instructions for creating a pixel can be found in the [Facebook Business Help Center](https://www.facebook.com/business/help/952192354843755?id=1205376682832142).

2. Select your pixel and click the **Meta Pixel Setup** button:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-9_1ocfzb5.png)

3. In the popup window, click the **Install code manually** button:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-10_1uq60vq.png)

4. Copy the generated code:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-11_1nycppb.png)

5. Paste it into your site settings, under the **Third-party code** section, in the **<HEAD>** tab:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-12_yrjwx1.png)

|| ${color}[#ffa800](Note:) You can find more details about adding third-party code in [this article](/en-us/article/adding-your-own-code-to-the-site-1f6tdsv/).

In case you want to track specific events on your site via Facebook Pixel — for example, how many times visitors click on the particular button — you can set them with the help of Event Setup Tool. No need to manually add any coding to the site — all changes should be done from your Pixel account.

|| ${color}[#ffa800](Note:) Since these settings are made on the Facebook Pixel side, if problems arise, our support team won’t be able to help — please contact Facebook Business support instead.

1. In your pixel's settings, scroll down to **Event setup** and click on the button in this section:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-3_kshfov.png)

2. Enter the site's URL to the relevant field and click **Open the website**:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-4_oqz8md.png)

3. In the opened tab, you will see the following pop-up on your site. Click **+ Track New Button** to set a new event:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-5_fs6wtn.png)

4. Click on the needed highlighted button to set up your event:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-6_1da7eji.png)

5. Choose what action you want to track in the dropdown and click **Confirm**:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-7_1r12v15.png)

6. Proceed with adding events across the site in the same way. Once you've finished, click **Finish setup**:

![](https://storage.crisp.chat/users/helpdesk/website/-/f/a/8/4/fa84b4d83a50e800/pixel-en-8_1j8yrnh.png)

Done! Now the added events will show up in the Overview tab of your Pixel's account. 

||| ${color}[#f97700](Important:) Once setup is complete, it may take up to 48 hours before you see results in Events Manager.

Further steps on how to manage your Pixel can be found in [the Facebook event setup guide](https://www.facebook.com/business/help/777099232674791?id=1205376682832142).