Stape has developed a tag for web GTM containers that allows you to add Facebook Pixel to GTM and efficiently manage data collection. In this article, we consider the benefits of integrating Facebook Pixel with GTM, and show you how to do it using the Meta Pixel tag by Stape.
Google Tag Manager is a handy hub for data tracking management without directly modifying your website's code. Integrating Facebook Pixel with GTM allows you to track the events you need easily; besides the standard ones, you can set custom event tracking.
GTM integration offers a convenient way to send event data to the Meta platform. With its help, you can keep all the tracking solutions you use besides Facebook Pixel in one place (e.g., Google Analytics 4, Google Ads).
Stape has developed a tag that allows the integration of Facebook Pixel with a web GTM container. The tag provides a hassle-free option to inherit data from the DataLayer, automatically parsing and mapping available event data. Alternatively, you can override the data and manually send information for standard or custom events.
Also, you can configure consent, which is important in the numerous data regulations. If you use server-side tracking, the tag allows deduplication of the same event if it is sent from different sources.
1. Download the Facebook Pixel tag from GitHub and upload it to the web GTM container.
Currently, the tag is unavailable in the GTM Template Gallery. But it will be added there in the future, so you can start using the tag by simply searching for it.
2. In the "Tags" section of the web GTM container, click "New" and choose "Facebook (Meta) Pixel" as the Tag Configuration.
3. Configure the tag.
3.1 Add Facebook Pixel ID - you can find it in Facebook Business Manager → "All tools" in the left-hand menu options → "Event Manager" → "Data Sources". In the "Settings" tab, you can find Dataset ID. Check our article for more details on how to find Dataset ID in Meta.
Tip: Use a constant variable for Pixel ID to avoid retyping the ID whenever it is required. |
3.2 Select Event Name Setup Method:
3.3 (If selected "Override" as event name setup method) Choose the Event type you want to track: standard from the list of available events or a custom one.
3.4 Check the boxes if it meets your needs:
3.5 Configure Compliance section:
3.6 (Optional) Object Properties - list the properties that will be sent to Meta with an event. See the list of Object Properties in Meta's documentation.
Server-side tracking - if you track the same event on server-side, configure this section by adding the Event ID parameter. It will allow deduplication of the same event if sent from multiple sources. Learn more about event deduplication in our blog post.
4. Add a trigger for a tag.
Click on "Preview" in the web GTM container. Trigger the event, and check whether it is fired.
Server-side tracking helps track data more accurately, improving the conversion attribution as you can send data directly from your server to Meta's server in our context. There are a few options for setting up server-to-server tracking:
Both methods require cloud services for data processing and provide similar benefits in terms of data accuracy. The key difference is that Facebook CAPI provides higher flexibility, as besides Meta, you can set up server-side tracking for a list of other platforms. Facebook CAPIG is an easy-to-set-up solution that will be a great fit for those who need to track conversions only from Meta.
Read more about the differences between Meta CAPI and Meta CAPIG in our blog post. |
Integrating Facebook Pixel with GTM simplifies event tracking, allowing businesses to manage data collection from a single interface. Stape’s custom Facebook Pixel tag offers inheriting event data from the DataLayer or allowing manual overrides for precise customization. The tag's configuration is straightforward; you can integrate Meta Pixel with Google Tag Manager in a few simple steps.
Stape has lots of options! Click on Try for free to register and check all the benefits.
Comments