Stape
Search
Try for free

How to use Facebook events if you cannot verify the domain

Published
Jan 21, 2022

Facebook's new protocol, Aggregated Event Measurement, allows tracking web and app events from iOS 14.5 or later devices. It is recommended to set up Aggregated Event Measurement to optimize ad sets for conversion events. You can configure only 8 events in the Aggregated Event Measurement (or 5 if you decide to add value optimization for purchases).

Another FB requirement that became mandatory is domain verification. If you didn’t verify your domain, you can’t add events to the Aggregated Event Measurement and use them for campaigns optimization. 

In this blog post, I want to show how to use server Google Tag Manager container and Facebook conversion API to modify URLs of Facebook events and optimize campaigns for events sent not from your domain. 

How to modify a domain using Facebook Conversion API and server GTM.

Let’s say you are using a third-party tool to sell tickets for the online event. A user visits your site, and when they want to buy a ticket, they are redirected to the 3rd party domain where they can purchase. 

You are launching Facebook campaigns and want to use success ticket purchase as an optimization event for your FB campaigns. Since the purchase event happens not on your website, you won’t be able to use the purchase event for the campaign optimization because the domain is not verified in your FB Business Manager. You can’t verify the domain even if the 3rd party tool allows adding FB pixel.

Here I want to show how to use Facebook Conversion API and server Google Tag Manager to modify the URL of the Facebook server events. It will allow using these events for campaign optimization. 

!

This method will work only if you can add Google Tag Manager code to the third-party tool. Facebook will track only server events.

2. Send event data from the web to server GTM. You can use GA4 or Data Tag/Data Client to send event data. Since you will track only server Facebook events, I suggest sending user data from the web to server GTM. User data will give Facebook more information about people who are converting, and it will match purchases to your campaigns more accurately. 

3. Add URL builder to the server GTM container from the Template Gallery.

4. Create a new variable in the server GTM -> variable type “URL Builder” -> Add URL and any query parameters you want -> Save.

URL builder variable

5. Set a Facebook conversion API tag in the server GTM. To change the URL, go to the Server Event Data Override section -> Select Source URL and add the URL you’ve created on step 4.

update url facebook conversion api

6. Open the debug mode of web and server GTM containers and test Facebook server events. You should see that the URL is updated.

test facebook conversion API
test facebook conversion API console

7. Open Facebook testing tool and check that you see the correct URL. 

!

In the FB event testing tool, you can see events only from the allowed domain list.

facebook evnt testing URL

Conclusion:

Facebook's domain verification policy affects a lot of advertisers, especially those who sell tickets to webinars or online conferences since most are using third-party tools for the checkout process. I hope this blog post helps you fix the problem by changing the source URL using server Google Tag Manager and Facebook conversion API.

Tagged with:Facebook

Host your GTM server at Staperight now!