Wascer
Themen im Hilfe-Center

Set up with Netlify

1 Min. LesezeitAls Markdown ansehen

Die Artikel erscheinen auf Englisch.

For sites hosted on Netlify, use serverless functions to create the proxy.

Step 1. Create the serverless function

Create the netlify/functions/metrics-proxy.js file in your project. The function extracts the client IP from the x-nf-client-connection-ip header and routes the request to the sGTM container with the X-Forwarded-For, X-From-Cdn, CF-Connecting-Ip, and Host headers.

Step 2. Configure redirects

In the _redirects file or netlify.toml, add the redirect rule from /metrics to the serverless function.

Step 3. Deploy

Commit and push the changes to the repository connected to Netlify. Deployment happens automatically.

War dieser Artikel hilfreich?

Nicht gelöst? Schreib dem Support.

Kommentare

Kommentar schreiben

Auf der Website erscheinen nur Ihr Vorname und der Anfangsbuchstabe Ihres Nachnamens; Ihre E-Mail-Adresse bleibt bei uns. Siehe Datenschutzerklärung.