Meta pixel tracking with Google Tag Manager is a powerful way to track various actions and events on your website. By using GTM to implement meta pixel tracking, you can gain insights into how users interact with your website, which can help inform your marketing and optimization strategies.
If you’re running any form of advertising on social media platforms like Facebook, tracking your marketing efforts is crucial for optimizing your campaigns.
One of the most powerful tools for tracking and analyzing marketing data is Google Tag Manager. By using GTM, you can track user behavior, measure conversion rates, and gather valuable insights into your marketing performance.
The Facebook pixel is an essential JavaScript code that links your website with Facebook’s Business Manager. By installing the pixel on your site, you can unlock valuable insights into user behavior, such as how visitors navigate your site, which pages they visit, and what actions they take.
The pixel also enables you to track conversions and optimize your Facebook ads for better performance. With Google Tag Manager, installing the Facebook pixel is a breeze. You can easily manage your Facebook tags alongside other marketing tags on your site, all from a single, user-friendly platform.
If you own an online yoga store, it is likely that many users who visit your website will not convert on their first visit. Instead, they may be in the consideration phase, where they are exploring their options and evaluating whether they need your products. This uncertainty can make it challenging to optimize your marketing efforts and maximize conversions.
By installing the Facebook pixel on your website, you can target your store visitors with ads on Facebook and Instagram, even after they leave your site. This is known as remarketing and is an incredibly effective way to drive conversions and improve your ROI.
Open the Meta business suit manager and head to the events manager tab.
Let’s create a new pixel and add it to our website. Select ‘Web’ as the data source and give the pixel a name.
Select the ‘Meta pixel only’ option and copy the pixel ID.
If you are using server-side GTM (SSGTM), configuring Facebook’s conversion API is recommended. After the iOS 14.5 update, iPhone users can opt-out of tracking by apps such as Facebook, causing a significant decline in ad performance.
According to the latest data from analytics firm Flurry, a whopping 96% of iOS users who have updated to iOS 14.5 have opted not to be tracked. SSGTM can be a great countermeasure to these recent changes if you have the budget to host your data on your server.
PageView
) Now we need to set up Meta’s configuration tag in Google Tag Manager.
Saving the ID as a constant will save us the hassle of pasting it each time we create a new tag. Head to the variables section in your GTM account and create a new variable. Select the “Constant” variable.
Go to the “Tags” section and create a new tag.
Insert your Meta ID and name your tag. Make sure that the event name is indicating PageView
.
The configuration tag should fire on all pages.
If the tag is displayed on you under the “Tags Fired” section, most likely it’s working correctly.
Once you publish the tag, you will be able to see your data in your Meta suite in a few hours.
As is the case with Google Analytics, it’s possible to track events in Meta. These events are the various interactions that occur on your website, including but not limited to scrolls, page impressions, and clicks.
According to Meta’s official documentation, there are two types of events that can be distinguished:
A visitor lands on a specific page, like a product page or a blog post.
ViewContent
We are going to create a tag to track visitors who land on the blog page. Let’s start by creating a new Facebook tag to track ViewContent
.
The link of our blog page will be the trigger for this event.
A visitor Subscribes to your paid service. Think of a Netflix subscription as an example.
Subscribe
Create a new tag for Subscribe
.
Go to event name > standard and select Subscribe.
You can send extra information with the event. Let’s say you have multiple subscriptions on your website: ‘Basic’, ‘Business’, and ‘Pro’. Each subscription tier has a starting price of $30, $99, and $199, respectively.
You can send this data to Meta by using the “Object Properties” option in our Facebook tag template. All you need to do is fetch the information from your website’s code.
The best method to get this data is by using the data layer. Once the implementation is finished, you will have all the information you need in one place. For the example given above, it might look something like this:
To pull the object properties from the data layer, click on the “+” next to the value field of tier.
We will create a data layer variable to get the value of tier.
Repeat this process as many times as needed to extract all the values from the data layer.
We can use the event name as a trigger for our event.
If you offer some sort of program, for example, online live classes, or a job offer, you can track the number of submitted applications.
Submit application
SubmitApplication
. Go to event name > standard and select SubmitApplication
.
Of course, you can send extra information with the tag. For example, let’s say you offer online classes on a wide range of subjects. You can send the class name and its price, among other details.
We can use the event name as a trigger for our event.
With StartTrial
event you can track the number of free trials for your software service for example.
StartTrial
Create a new tag for StartTrial
.
value
and country
. The event name will be the trigger for the event.
Search
, you can create an audience based on the number of users who performed a search using the internal search engine on your website. Search
Create a new tag for Search
.
It might be useful to send the search term with this event.
The event name will be the trigger for the event.
Schedule
to track the number of booked appointments. Schedule
Create a new tag for Schedule
.
bookingId
, bookingDate
, and bookingDuration
with this event. The event Schedule
will be the trigger for the event.
Lead
to create a list of potential customers. A common scenario where this event is used is when a visitor fills out personal information to download an e-book or to receive a newsletter. Lead
Create a new tag for Lead
.
content_type
to understand what is the best form to generate leads on your website (e-book, newsletter, etc.). If you have multiple signup forms (each has a different downloadable resource), adding content_name
will help you distinguish between them.
The event Lead
will be the trigger for the event.
The Contact
event can be triggered once the user submits a request on a “Contact us” form or if he clicks on a phone number on your page.
Contact
Create a new tag for Contact
.
You can send content_type
to distinguish between different mediums of contact available on your website (contact form, chatbot, phone call, etc.).
The event Contact
will be the trigger for the event.
If you own a physical store, you might need to track the number of website visitors who search for your address via a map on the website. TheFindLocation
event can be triggered each time a visitor user the map on your website or app to locate your physical store.
FindLocation
Create a new tag for FindLocation
.
Adding the object property location
to your data layer will help you distinguish between multiple stores, if you are managing more than one.
The event FindLocation
will be the trigger for the event.
The Donate
event can be useful for tracking the number of clicks on a donate button on your website or app. This event can provide insights into the effectiveness of your donation call-to-action and help you measure the success of your fundraising efforts.
Donate
Create a new tag for Donate
.
Some essential piece of information to send along with this event is value
and currency
.
The event Donate
will be the trigger for the event.
We will put ecommerce events in a distinct category, as these events form together a discrete funnel.
Most ecommerce event include products data, so we will include a products
or an items
object (if you are using GA4 ecommerce schema) in the data layer for all ecommerce events.
CustomizeProduct
event. CustomizeProduct
Create a new tag for CustomizeProduct
.
CustomizeProduct
in Google’s enhanced ecommerce documentation. CustomizeProduct
. The data layer might look like this: If you are already using the GA4 ecommerce data schema, then your data layer will be slightly diffrent.
For instance, the GA4 version has some different key names, instead of working with products
, the items
object will contain all product data.
CustomizeProduct
will be the trigger for the event. When a user clicks on the ‘add to wishlist’ button on your website or app, you can track this action using a Wishlist event. This event can help you understand which products or items are most frequently added to wishlists and can inform your marketing and promotion strategies
AddToWishlist
AddToWishlist
. AddToWishlist
is not supported by the UA schema. The event AddToWishlist
will be the trigger for the event.
Each time a user click on an “Add to cart”, the event AddToCart
will be triggered.
AddToCart
Create a new tag for AddToCart
.
The event AddToCart
will be the trigger for the event.
When a visitor clicks on a checkout button and heads to the checkout page on your website or app, you can track this action using a Checkout event. This event can help you understand how many visitors initiate the checkout process and can provide insights into where users may be dropping off during the checkout flow.
InitiateCheckout
Create a new tag for InitiateCheckout
.
Using the enhanced ecommerce model, the event eec.checkout
will be the trigger for the event.
The event begin_checkout
will be the trigger for the event.
The visitor saves his payment information.
AddPaymentInfo
Create a new tag for AddPaymentInfo
.
Using the enhanced ecommerce model, the event eec.checkout
will be the trigger for the event.
Unlike in Universal Analytics (UA), the GA4 schema provides more details about the transaction due to the attribution limitations in GA4. To keep the data consistent, it is important to push the same data from one checkout step to another. This ensures that you have a complete view of the user’s journey and can better understand their behavior throughout the checkout process.
The event add_payment_info
will be the trigger for the event.
When a user completes the checkout process and their order is confirmed on your website or app, you can track this action using a Purchase event. This event allows you to capture important transactional data, such as order value and currency, as well as product and transaction IDs. By tracking this event, you can better understand the effectiveness of your ecommerce efforts and identify areas for improvement in your sales funnel
Purchase
Create a new tag for Purchase
.
Using the enhanced ecommerce model, the event eec.purchase
will be the trigger for the event.
Unlike in UA, the GA4 schema has more details about the transaction because the attribution doesn’t work as well. We need to keep pushing the same data from one checkout step to another in order to keep the data consistent.
The event purchase
will be the trigger for the event.
Unlike standard events, you can tailor your tracking to your specific needs by using custom events.
For some specific tracking needs, standard events may not be sufficient. In such cases, you can use custom events to track actions that are not covered by the default set of events. For example, if you want to target visitors who have viewed at least one video on your website, you can create a custom event to track this action. As of the date of writing, there is no standard event available for this specific action, making custom events a valuable tool for tailoring your tracking to your specific needs
To track this action, we need to choose the custom event option in the “Event” section of the Facebook template.
We can send other data besides the number of video impressions. The video process, title, and duration can be helpful as well.
Automated page speed optimizations for fast site performance