Facebook Pixel With Google Tag Manager

8 views
Skip to first unread message

Cloris Sopha

unread,
Aug 5, 2024, 5:56:52 AM8/5/24
to tichildnachtai
myFacebook pixel all of a sudden stop receiving majority of events! Everything is smooth, Meta pixel helper is tracking all events, In Facebook event manager is working all good while I'm pretty much sure all sales are coming from Facebook! as I'm not working on any other platform, Never did SEO and yes, These are surely not Facebook organic sales! I've contacted Facebook several times, But there also don't have any answer why is this happening, They're just coming up that they re-fresher your pixel and will closely monitor sales! attached are some screenshots that would more clarify that everything is good with set-up, Because if pixel wasn't installed perfectly, Then since past year, it wont have worked great! And as pixel is not recording purchases, The sales are going down

When you set up Facebook and Instagram by Meta, you can add a pixel to track customer data and behaviour on your Online Store. To use a Meta pixel, you need to set a customer data-sharing level. It's up to you to decide how much data you want to track using the pixel. The Standard data sharing setting sends only customer behaviour. The Enhanced and Maximum settings send additional customer information including name, location, and email address.


If you work with an advertising agency or use an app to manage your Facebook ads or traffic, then make sure that adding a Meta pixel to your online store won't cause duplicate or incorrect data in your reports.


You can create a new Meta pixel directly in Facebook and Instagram by Meta by clicking Create new in the pixel set-up box, or you can create a Meta pixel in Facebook Ads Manager. To create a pixel in Facebook Ads Manager, refer to the Facebook Help Center.


When you add a Meta pixel to Facebook and Instagram by Meta, the pixel integrates with your online store. A Meta pixel can be added when you're setting up Instagram Shopping or Facebook Shop. Before you can add a Meta pixel, you need to activate data sharing in the Customer data-sharing section.


In the Customer data-sharing section of your Share data settings in Facebook and Instagram by Meta, there's a list of pixels that you have created. Click Connect to connect a preexisting Meta pixel or click Create new to create a new Meta pixel.


If you edited your theme file code to add a Meta pixel, then you need to remove the pixel code before you can add a Meta pixel ID using Facebook and Instagram by Meta. If you don't remove the pixel code, then your store will have more than one pixel on it, which can result in duplicate or incorrect data in your reports.


After you add a Meta pixel in Shopify, the pixel tracks certain events on your online store, such as when a customer views a certain page. For more information on customer data-sharing events, refer to Facebook data sharing.


On July 1, 2023, management of Meta pixel is moving from your Online Store Preferences to the Facebook & Instagram app. To continue tracking customer behavior and analyzing store traffic, you need to add your Meta pixel to the Facebook and Instagram app.


I added a pixel code injection as per the instructions. but then had to delete it... not sure if I've deleted all the code, and now it won't let me add a new pixel code. I was wondering if I should delete line 13 in the attached image? It looks similar to the other code I deleted (don't judge me, lols!). I have also attached a pic of the error code I get


I have added the facebook pixel chrome extension after reading another help topic and it says my site has a pixel but has not been activated yet. I have no idea what I'm doing. Would appreciate any help!


This plugin used to be called Facebook Conversion Pixel and was updated to work with the new Facebook Pixel. Facebook has deprecated the old Facebook Conversion Pixel in favor of the new pixel, so we highly recommend migrating.

Wondering how to migrate from the old Facebook Conversion Pixel to the new Facebook Pixel? Read this blog post:

How to Migrate to the new Facebook Pixel


Yes, our our pro plugin makes setting up a Facebook Pixel WooCommerce integration a breeze. Not only that, Pixel Cat Premium lets you create a Facebook Product Catalog for WooCommerce. Click here to learn more.


If you use Facebook ads, you need to use Facebook Pixel to measure the success of your campaigns. Deploying the Pixel on your website helps Facebook understand your website and how users interact with it. By extension, Facebook will understand how conversions happen on your website.


In this guide, I will show you how to install Meta Pixel with Google Tag Manager (not only basic pageviews but also other things, like events). The topic is quite extensive. Therefore, I recommend buckling up and diving into this. Also, consider subscribing to my newsletter to stay up-to-date with GTM.


This article will cover only the essential things to know when deploying the Facebook Pixel via Google Tag Manager. For a more detailed guide/tutorial, I have extensive lessons about FB Pixel + GTM in my GTM course for beginners.


Facebook Pixel is a solution created by Facebook that allows you to measure user/visitor behavior on your site. This information can further be used to track conversions, optimize campaigns or build audiences based on the data you send.


Once you place certain JavaScript code snippets on your site (and activate them based on user/visitor behavior), this data is sent back to Facebook. I will not dive deeper into the possibilities (because this blog post focuses more on the implementation). But if you are new to FB Pixel, you can get more information here.


Back in the older days (pre-2019), the only way to install Facebook Pixel via Google Tag Manager was by using the Custom HTML tag template. This meant working directly with JavaScript code, editing it a bit, etc.


These days, things are much simpler and more elegant because Simo Ahava created a Facebook Pixel Custom Template and shared it with everyone. It will make the entire Meta Pixel tag management process more convenient and less prone to errors.


Everything starts with the basic implementation of the Meta pixel. In other guides (especially the older ones) found online, you might see a term called Facebook Pixel Base Code (or something similar). In the next several steps, I will explain exactly that (but without using the term Base Code).


Suppose you deploy 50 or even more tags that send data to Facebook. You would need to insert the Pixel ID 50+ times manually. But what if one day, you have to switch to another Pixel ID? You will need to change the ID on all the tags manually.


Facebook Pixel Helper. Similar to GA4, you must ensure that the Meta Pixel has received the event data. Meta has a browser extension called Facebook Pixel helper. Install it, and this icon appears in the top right corner of your Chrome.


Enter the URL of your website (if I were working with my site, I would enter ) and click Open Website. After you are redirected to your website, go to the Test Events tab and check whether you see Pageviews coming from your device. If nothing appears, go back to your site and refresh the page once again.


You can manually deploy the Custom HTML tag when you have access to the complete Meta pixel code. Inside the tag code, you would need to make modifications if you wanted to capture additional parameters.


Where can you get the full Facebook Pixel code? Go to your chosen Meta Pixel in the Events Manager and select your pixel. Click on Manage Integrations, and a new window will appear on your screen.


A new screen will come up, asking you whether you want to install it manually or via a partner integration. Choose Manually add pixel code to website, and the browser will redirect to a new page.


According to the official Facebook documentation, standard events are the most common actions a visitor/user can do on a site. The Meta platform recognizes and supports those events across all ad products. These events can be used to build audiences and optimize conversions.


If you struggle to track interactions on your own, you might need to ask a developer for help. They will then push data to the Data Layer, and you need to use the Custom Event trigger to catch that data.


The final step is to test the reports in Facebook Business Manager. Go to Events Manager > Data Sources. Choose your Pixel and then click Test events. Check whether you see the Lead event there.


We want this tag to fire only when someone clicks the Play button. Therefore, we need to create a Youtube video trigger for that. Click the Triggering section in your Facebook Pixel tag and select the Plus icon in the top right corner.


Also, by looking at the documentation, you can see which fields are expected by Meta. For example, if you send the AddToCart event and want to send some custom data (like product price, etc.), the Facebook pixel will expect content_ids, content_name, content_type, contents, currency, value. None of these are required when it comes to AddToCart.


Next, click the Triggering section in your Facebook Pixel tag and select the Plus icon in the top right corner to create a new trigger. Then click Trigger Configuration > Custom. We want that dataLayer.push (that contains the transaction data) to use as a trigger.


Following the steps in this guide, you probably have already noticed that Facebook Pixel Helper shows things like Microdata Automatically Detected or Button Click Automatically Detected. This is called Automatic Data Detection.


First, I will show how to set the Advanced Matching up in Google Tag Manager. Imagine that you work with a website where users can log in and use your services. You could ask a developer to push the following data to the Data Layer (and do this before the GTM container code is loaded):


Excellent writeup. Question if you have time: I created a PageView tag to send data from my dataLayer. I see when testing I get two page views, one with no data (perhaps one that facebook sends automatically?) and one with my data. Should I somehow disable the one without data, and if so, how would I do that? I'm using gtm-templates-simo-ahava.

3a8082e126
Reply all
Reply to author
Forward
0 new messages