Own CDN vs. Stape CDN - differen request url

Hi,

when I set up own CDN through Cloudflare I am seeing event requests with collect?v=2 url.

If I set up Stape CDN, then the requests have a custom loader CDN

The result is that the set up with own CDN will cause the events to get blocked by ad blockers, and with Stape CDN ithey don’t

This is my cloudflare rules configuration (they changed the UI again, so you might revise the blog instructions, to match Cloudflare UI):

Here’s the DNS record in Cloudflare:
image

Is there any way to get requests to contain the custom loader with own CDN setup?

It has nothing to do with using a CDN. In one case you have the ‘GA4 bypass’ option active and in the other case you do not. You can activate this option and use it in custom loader power-up:

If you use the same origin approach don’t forget to specify there which /path you use to encrypt GA4 events.

In all cases I’m using WP plugin to load GTM container where the instructions remain the same whether I check this or not.

I noticed with another client that the CDN really isn’t the case. One of their website uses Stape CDN, the other three don’t. But requests with collect?v2 url appear in two sites that don’t have CDN, and on the other that also doesn’t have CDN, they appear with a custom loader string.

So the behavior is very inconsistent, and I can’t figure out where’s the difference.

The settings are exactly the same, except for CDN. GTM server-side WP plugin > copied the input fields, and that’s it. The container is the same, and tags are the same (only IDs are dynamically changed based on hostname).

Plugins are up to date on all websites, so there’s no difference in versions either.

Unless sometimes Server-Side GTM plugin generates a snippet to bypass ad blockers and sometimes it doesn’t based on something else, that I’m unaware of.

Hi, @Alex,

I recorded a Loom video so you can see the settings and help me figure out where’s the issue.

Thanks

I need to verify with some other websites, but for one of them, this was solved by switching to Stape CDN, so I guess it makes a difference.

CDN only affects how your container is loaded, it has no effect on other GTM features or any tags/functions.
The ‘GA4 bypass’ option is simply toggled on or off, it really doesn’t affect the custom loader or its settings, nor does it require any changes to the Stape plugin.

I have checked the sites you have listed:
gumiranepodlage.si here you are not using CDN and I see that bypass is working

sportnaoprema.si here you are using Stape CDN option and bypass is also working

I don’t see any problems, or am I missing something?

Ok, now I’m even more confused. I didn’t change anything, and when I recorded the video you can clearly see the requests url on gumiranepodlage.si weren’t containing the custom loader. Now I have checked as well, and it seems like it works. I don’t know what happend in between.

On some other websites I had similar issues, and then when I changed to Stape CDN it started working, that’s why I assumed this is related.

Maybe it was a plugin version, although I think we’ve updated them on all websites. I don’t know anymore.

Anyway. I guess everything works now.

Take care.

Note that bypass is not activated instantly, sometimes you need to wait 5-10 minutes for it to start working. So maybe it has to do with the fact that you tested it immediately, maybe that was the problem.

I did the setup for this client in november. I know it worked then, but I’ve been seeing ?collect requests url for a few weeks, so that’s why it didn’t make any sense to me.

Anyway, it’s working now, but I have no explanation to why this happend.