---
title: How to install the Facebook pixel on your website
description: Follow the steps in this guide to insert the Facebook pixel on your website. You can do it manually or through Google Tag Manager.
---

[Skip to content](https://knowledge.profitmetrics.io/how-to-install-the-facebook-pixel-on-your-website#main-content)

[![ProfitMetrics logo black version](https://knowledge.profitmetrics.io/hs-fs/hubfs/pm_logotype_blue.png?width=193&height=28&name=pm_logotype_blue.png)](https://knowledge.profitmetrics.io/?hsLang=en)

Open main navigation

Close main navigation

- [Contact Support](https://knowledge.profitmetrics.io/kb-ticket/new)

[Contact Support](https://knowledge.profitmetrics.io/kb-ticket/new?hsLang=en)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge base](https://knowledge.profitmetrics.io/?hsLang=en)
2. [Ad Channels](https://knowledge.profitmetrics.io/ad-channels?hsLang=en)
3. [Meta (Facebook/Instagram)](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#meta-facebook-instagram)

# How to install the Facebook pixel on your website

## Follow the steps in this guide to insert the Facebook pixel on your website. You can do it manually or through Google Tag Manager.

---

Option 1: [Install the pixel manually](https://knowledge.profitmetrics.io/how-to-install-the-facebook-pixel-on-your-website#step1)

Option 2: [Install the pixel through Google Tag Manager](https://knowledge.profitmetrics.io/how-to-install-the-facebook-pixel-on-your-website#step2)

Option 3: [Install the pixel on Shopify](https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/meta-pixel)

---

### Option 1: Install the pixel manually

1. Copy the script below
   
   ```
   <!-- Facebook Pixel Code --><script>  !function(f,b,e,v,n,t,s)  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?  n.callMethod.apply(n,arguments):n.queue.push(arguments)};  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';  n.queue=[];t=b.createElement(e);t.async=!0;  t.src=v;s=b.getElementsByTagName(e)[0];  s.parentNode.insertBefore(t,s)}(window, document,'script',  'https://connect.facebook.net/en_US/fbevents.js');  fbq('init', '{XXXXXXXXXXXXXXX}');  fbq('track', 'PageView');</script><noscript>  <img height="1" width="1" style="display:none"        src="https://www.facebook.com/tr?id={XXXXXXXXXXXXXXX}&ev=PageView&noscript=1"/></noscript><!-- End Facebook Pixel Code -->
   ```
2. Paste the script between the \<head\> and \</head\> tag on your website theme.
3. Replace the two instances of  "**XXXXXXXXXXXXXXX"** with your actual pixel ID.
4. Save and publish the changes

### Option 2: Install the pixel through Google Tag Manager

1. Log in to [https://tagmanager.google.com](https://tagmanager.google.com)
2. Click **Tags**  
   ![Create Facebook Pixel Tag in Google Tag Manager - Step 2 (1)](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%202%20(1).png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%202%20(1).png)
3. Click "**New**"  
   ![Create Facebook Pixel Tag in Google Tag Manager - Step 3](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%203.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%203.png)
4. Click "**Tag Configuration**"  
   ![Create Facebook Pixel Tag in Google Tag Manager - Step 4](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%204.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%204.png)
5. Click **"Discover more tag types in the Community Template Gallery"**  
   ![Create Facebook Pixel Tag in Google Tag Manager - Step 11](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2011.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2011.png)
6. Search for "**Facebook Pixel**" and click **"Facebook pixel by facebookarchive"**  
   ![Google Workflow - Step 2](https://knowledge.profitmetrics.io/hs-fs/hubfs/Google%20Workflow%20-%20Step%202.png?width=655&height=366&name=Google%20Workflow%20-%20Step%202.png)
7. Click "**Add to workspace**"  
   ![Create Facebook Pixel Tag in Google Tag Manager - Step 19](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2019.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2019.png)
8. Click **"Add"  
   ![Create Facebook Pixel Tag in Google Tag Manager - Step 20](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2020.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2020.png)**
9. Insert your **Facebook Pixel ID** in the "Facebook Pixel ID(s)" field  
   **![Create Facebook Pixel Tag in Google Tag Manager - Step 23](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2023.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2023.png)**
10. Click **"Triggering"**  
    ![Create Facebook Pixel Tag in Google Tag Manager - Step 24](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2024.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2024.png)
11. Select **"All Pages"**  
    ![Create Facebook Pixel Tag in Google Tag Manager - Step 25](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2025.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2025.png)
12. Click **"Save" and "Save" again  
    ![Create Facebook Pixel Tag in Google Tag Manager - Step 26](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2026.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2026.png)  
    ![Create Facebook Pixel Tag in Google Tag Manager - Step 27](https://knowledge.profitmetrics.io/hs-fs/hubfs/Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2027.png?width=688&height=385&name=Create%20Facebook%20Pixel%20Tag%20in%20Google%20Tag%20Manager%20-%20Step%2027.png)**
13. Remember to make any required adjustments to respect consent, and publish the changes.

 

- [Getting Started](https://knowledge.profitmetrics.io/getting-started?hsLang=en#main-content)

    - [Learn the Basics](https://knowledge.profitmetrics.io/getting-started?hsLang=en#learn-the-basics)
    - [Prepare for Onboarding](https://knowledge.profitmetrics.io/getting-started?hsLang=en#prepare-for-onboarding)
    - [Account Setup](https://knowledge.profitmetrics.io/getting-started?hsLang=en#account-setup)
- [E-commerce Platforms](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#main-content)

    - [Shopify](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#shopify)
    - [WooCommerce](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#woocommerce)
    - [Magento](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#magento)
    - [PrestaShop](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#prestashop)
    - [BigCommerce](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#bigcommerce)
    - [Shopware](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#shopware)
    - [DanDomain & Related](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#dandomain-related)
    - [Universal Integration (Clientside)](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#universal-integration-clientside)
    - [Universal Integration (Server-side Hybrid)](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#universal-integration-server-side-hybrid)
    - [Other Platforms](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#other-platforms)
    - [Developer Documentation](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#developer-documentation)
- [Ad Channels](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#main-content)

    - [Google Ads](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#google-ads)
    - [Meta (Facebook/Instagram)](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#meta-facebook-instagram)
    - [Microsoft Bing Ads](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#microsoft-bing-ads)
    - [Google Analytics 4](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#google-analytics-4)
    - [Partner-ads](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#partner-ads)
    - [Other Channel Configuration](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#other-channel-configuration)
- [Tracking & Conversion Setup](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#main-content)

    - [Overview](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#overview)
    - [Conversion Booster for Google Ads](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#conversion-booster-for-google-ads)
    - [Conversion Booster for Meta](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#conversion-booster-for-meta)
    - [Conversion Booster Custom Pixels](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#conversion-booster-custom-pixels)
    - [Enhanced Conversions](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#enhanced-conversions)
- [Shopping Booster](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#main-content)

    - [Overview & Setup](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#overview-setup)
    - [Supplemental Feeds](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#supplemental-feeds)
    - [Campaigns & Labels](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#campaigns-labels)
    - [Troubleshooting](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#troubleshooting)
- [Product Feed & Costs](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#main-content)

    - [Product Feed](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#product-feed)
    - [Shipping & Payment Costs](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#shipping-payment-costs)
    - [Expenses](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#expenses)
- [Dashboard, Orders & Reporting](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#main-content)

    - [Dashboard & Orders](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#dashboard-orders)
    - [Looker Studio](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#looker-studio)
    - [Google BigQuery](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#google-bigquery)
- [Account & Billing](https://knowledge.profitmetrics.io/account-billing?hsLang=en#main-content)

    - [Users & Access](https://knowledge.profitmetrics.io/account-billing?hsLang=en#users-access)
    - [Billing & Invoices](https://knowledge.profitmetrics.io/account-billing?hsLang=en#billing-invoices)
- [Privacy & Consent](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#main-content)

    - [GDPR](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#gdpr)
    - [Consent Management Platforms](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#consent-management-platforms)
    - [Google Consent Mode](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#google-consent-mode)
- [For Agencies](https://knowledge.profitmetrics.io/for-agencies?hsLang=en#main-content)

    - [Getting Started as an Agency](https://knowledge.profitmetrics.io/for-agencies?hsLang=en#getting-started-as-an-agency)
    - [Agency Certification](https://knowledge.profitmetrics.io/for-agencies?hsLang=en#agency-certification)
- [Shopify](https://knowledge.profitmetrics.io/shopify?hsLang=en)
- [PrestaShop](https://knowledge.profitmetrics.io/prestashop?hsLang=en)
- [Google Ads](https://knowledge.profitmetrics.io/google-ads?hsLang=en#main-content)

    - [troubleshoot](https://knowledge.profitmetrics.io/google-ads?hsLang=en#troubleshoot)
- [Meta (Facebook / Instagram)](https://knowledge.profitmetrics.io/meta-facebook-instagram?hsLang=en)
- [Shopping Booster for Google Ads](https://knowledge.profitmetrics.io/shopping-booster-for-google-ads?hsLang=en)
- [Uncategorized](https://knowledge.profitmetrics.io/uncategorized?hsLang=en)
- [Billing](https://knowledge.profitmetrics.io/billing?hsLang=en)
- [Google Sheets](https://knowledge.profitmetrics.io/google-sheets?hsLang=en)
- [Account](https://knowledge.profitmetrics.io/account?hsLang=en)
- [Ideal Shop](https://knowledge.profitmetrics.io/ideal-shop?hsLang=en)
- [Returns](https://knowledge.profitmetrics.io/returns?hsLang=en)

[![ProfitMetrics logo black version](https://knowledge.profitmetrics.io/hs-fs/hubfs/pm_logotype_blue.png?width=193&height=28&name=pm_logotype_blue.png "ProfitMetrics logo black version")](https://profitmetrics.io)

<https://www.facebook.com/ProfitMetrics/> <https://podcasts.apple.com/> [mailto:support@profitmetrics.io](mailto:support@profitmetrics.io)

Copyright © 2026, ProfitMetrics ApS