Testing Zaraz to Set Up Facebook Conversions API

I’ve been in search of a Facebook Conversions API alternative to the API Gateway that works seamlessly with Google Tag Manager. I may have found it in Zaraz.

To be clear, the API Gateway works great. But I’ve heard consistently that its AWS hosting prices many small businesses out. Truthfully, I’d love to find a more affordable option myself if it’s available.

Zaraz appears to fit the bill in every way for me. Not only does it utilize triggers in many of the same ways as Google Tag Manager, but it may not cost a thing.

I’m still testing. We’re in the process of figuring out deduplication. But let me explain what excites me about Zaraz…

What is Zaraz?

Zaraz is a third-party tool manager built by Cloudflare. I’m not going to try to explain the technical capabilities of the tool because that’s not my expertise.

What I do know is that among its capabilities is sending web events for Facebook Conversions API. And not only is it built by Cloudflare, but it’s built into it.

In other words, if you already pay for Cloudflare for caching (like I do), you can set up the Conversions API without spending another penny.


Something I didn’t immediately understand is that Zaraz isn’t a replacement for Google Tag Manager’s client-side events. Zaraz will only send the server-side events.

We’ll need to address that later.


One of the powers of Zaraz is the triggers. If you’ve created custom events with Google Tag Manager before (one of my absolute favorite things), you’ll be right at home here.

In fact, it’s infinitely easier with Zaraz. Zaraz triggers are based on rules.

Zaraz Triggers

Much of this requires some knowledge of CSS. I’m going to skip that and go straight to the easy and powerful stuff.

You can create triggers using a timer. For example, you can have a trigger fire once a visitor has spent 60 seconds on a page.

Zaraz Timer Trigger

Or you can create a trigger using scroll depth. For example, fire a trigger when a visitor scrolls at least halfway down a page.

Zaraz Scroll Depth Event

These are two triggers that I use for my “quality traffic” custom events that are set up in Google Tag Manager.

Here’s an example of the scroll depth trigger with Google Tag Manager…

And a timer in GTM…


Once you have your triggers, you can create events in Zaraz. No coding is necessary.

Here’s what it looks like to create an event for a 3 Minute visit on a page that fires when the 3 Minute trigger happens.

Zaraz API Event

That’s it. So incredibly simple.


I want to make this point quickly because I don’t want anyone to be confused like I was. When you test these events, they will not appear in the Facebook Pixel Helper.

Some people may know that. I took it for granted because when I used the API Gateway, all of the same events were being sent both client-side and server-side. So, I didn’t realize that only the client-side events appeared.

To test server-side events, you’ll need to go to the Testing area of Events Manager.

Server-Side Testing


As mentioned at the top, events created with Zaraz will only be server-side (API). You will need another method for managing client-side to fire pixel events. I use Google Tag Manager.

Since events will fire from both locations independently, we are presented with an issue. If a 50% scroll depth event fires from Zaraz and from Google Tag Manager for the same scroll from the same user, how does Facebook know that it’s the same event?

First, you could theoretically run most of your events server-side and only use Google Tag Manager for events that Zaraz can’t create. I wouldn’t consider myself an expert on this, but my understanding is that Zaraz can’t replicate events I’ve created in Google Tag Manager for plays of my podcast player or embedded YouTube videos.

That’s not necessarily the best practice, though. If possible, you want to send the event both server-side and client-side and then deduplicate them.

I have Joel Hughes and his team from Glass Mountains helping me with that part of it (strong recommendation if you need their help). The solution appears to be related to an external_id and other technical stuff that is way over my pay grade.

Once I get that sorted out, I will provide details on how deduplication was accomplished so that you can do it, too.

Watch Video

I recorded a video about this, too. Check it out below…

Your Turn

Have you experimented with Zaraz? What do you think?

Let me know in the comments below!