Adding tracking pixels to Shopify is relatively simple and straightforward. Before you start, however, it's important to note that you will require a Facebook Ads account.
Once you have that sorted, follow the steps below to set up a Facebook Pixel on your Shopify store:
Log in to your Shopify store and access the admin in your Shopify sites.
Navigate to the Online Store submenu that's under the Preferences menu.
Now click onto the Preferences link, then open the “Additional Google Analytics Javascript” section by clicking on it.
Type in the snippet of code that is provided by Facebook.
Click the Save button.
After saving the code, it will now appear on your site and you are now ready to start tracking the performance of your marketing campaigns.
This is all there is to it. You can now start using the insights you gain from the pixel to optimize your campaigns to better reach your target audience and grow your business.