To manually add the Facebook pixel to a Shopify website, you can follow these steps:
- Log in to your Facebook Ads account and navigate to the Pixels tab in the Events Manager.
- Click on the “Create a Pixel” button.
- Give your pixel a name and click “Create Pixel”.
- Click on the “Add Pixel to Website” button and select “Manually Install the Code Yourself”.
- Copy the pixel code provided by Facebook.
- Log in to your Shopify account and navigate to the “Online Store” section of the sidebar.
- Click on “Themes” and then on the “Actions” button next to the theme you want to edit.
- Select “Edit Code” from the drop-down menu.
- Locate the theme.liquid file in the layout folder and open it.
- Scroll to the bottom of the file and paste the pixel code before the closing </body> tag.
- Save the changes to your theme.
- To check if the pixel is installed correctly, use the Facebook Pixel Helper chrome extension
- After you have confirmed that the pixel is working correctly, you can start creating and optimizing your campaigns, setting up events and tracking conversions.