Manually install Facebook pixel Shopify

Manually install Facebook pixel Shopify
Arun Patel

Arun Patel

May 2 2023

7
1.9k

A step-by-step guide on how to manually install Facebook Pixel on Shopify. It includes creating a pixel in Facebook Ads Manager, obtaining the pixel code, and adding the code to the Shopify website.

Here are the steps to manually install Facebook Pixel on Shopify:

1. To get started, log in to your Facebook Ads Manager account and go to the "Pixels" tab. From there, select "Create a Pixel" and give it a name.

To get the Facebook pixel code, follow these steps:
  1. Log in to your Facebook Ads Manager account and navigate to the "Pixels" tab under Business Settings.
  2. If you haven't created a pixel yet, click on the "Create a Pixel" button. Otherwise, select the pixel you want to use.
  3. To continue, click the "Set up the Pixel/Add" button. Then, create a pixel name and click "Setup pixel now.”
  4. Choose how you want to install the pixel. Select "Manually install the code yourself" to get the code for manual installation.
  5. You will see the pixel code that you need to install on your website. Copy the entire code.

2. Navigate to "Online Store" on your Shopify dashboard, and click "Themes". Then, click on "Actions (3 dots)" and select "Edit Code".

3. Locate the "theme.liquid" file in the code editor and click to open it.

4. Find the tag and paste the Facebook pixel code immediately above it.

5. If the pixel Id is not found in the code, replace the text in the code with your Facebook pixel ID. You can find this ID in the Facebook Ads Manager under the "Pixels" tab.

6. Save the changes and exit the code editor.

7. To test if the pixel is working, visit your website and then return to the Facebook Ads Manager. Click on "Pixels" and then click on "Test Events". You should see a green checkmark next to the pixel ID, indicating that it's working.

That's it! Your Facebook pixel is now installed on Shopify and ready to track data for your Facebook Ads campaigns.