How can we help?

Same Origin Path

Ivanna
Ivanna
  • Updated

When setting up server container on Stape, you should configure custom domain

 

If you’ve set up and are using the Same Origin approach, you need to specify your same origin path for GA4 encryption to work correctly. You can learn more about customising the same origin approach here.

 

Знімок екрана 2024-12-23 о 15.56.59.png

 

By using a Same Origin Path, you can ensure that requests to the GTM server container appear to come from the same domain as the website, allowing them to bypass the filters set by ad blockers. The proxy path ensures that requests to your server container are routed through the custom domain, making it look like part of the same content delivery network (CDN) or server, even though the data is being handled on the server-side.

 

Note: Stape uses location.origin to determine the domain for GA4 requests. Please esure that your server_container_url uses the same origin path on the exact same hostname as the page.
Similar logic applies to subdomains.

 

1. Example. 

Your hostname is www.example.com and you use /metrics for patch.

Accordingly, your server_container_url should be www.example.com/metrics

 

2. Example.

Your hostname is example.com and you use /metrics for patch.

Accordingly, your server_container_url should be example.com/metrics

 

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.