Stape
Search
Try for free
FreeStape benefit

Own CDN

Own CDN increases cookie lifetime in Safari 16.4 and other browsers using ITP set from “third-party” IP addresses. 

The most recent iteration of ITP reduces the lifetime of first-party cookies to 7 days if they are set through a different IP address than your website. 

By utilizing your Stape Own CDN, you can route the server GTM tagging URL via the same IP address your site uses. This ensures that the IPs for your sGTM URL and website are identical. As a result, WebKit will not shorten the duration of first-party cookies set via the server-side Google Tag Manager.

Stape Own CDN is available on all plans.

1. Go to your Stape container setting and select Own CDN.

select own cdn on stape

2. Go to CloudFlare and configure CNAME record for the tagging server URL. Please make sure that Proxied is enabled. The setting should look like in the screenshot below.

configure CNAME record for the tagging server UR

3. Go to the Rules → Configuration Rules - create a new rule

  • Specify any name you like for the rule
  • Select ‘Custom filter expression’ 
    • Field: hostname
    • Operator: contains
    • Value: specify your sGTM subdomain. In our example is ‘gtm.stape.tools’
create a new rule

Scroll down on this page and find the ‘SSL’ feature. Activate it with ‘Full’ option.

activate ssl feature

4. Go to the Rules → Transform Rules → Modify Request Header - create a new rule

Specify any name you like for the rule

Select ‘Custom filter expression’

Field: hostname

Operator: contains

Value: specify your sGTM subdomain, in our example, it is ‘gtm.stape.tools’

create a new rule

In the modify headers section, specify:

Type: Set static

Header name: X-From-Cdn

Value: cf-stape

create a new rule

Deploy changes

5. Go to the Caching → Cache Rules - create a new rule

  • Specify any name you like for the rule
  • Select ‘Custom filter expression’ 
    • Field: hostname
    • Operator: contains
    • Value: specify your sGTM subdomain. In our example, it is ‘gtm.stape.tools’

Cache eligibility: Bypass cache

create a new rule

Deploy changes.

That's it, now all your requests to and from sGTM will be proxied through Cloudflare.

*If you are using a Web Application Firewall please make sure that it will not block these requests.

We have more than 100 000 happy clients

Host your GTM server at Staperight now!