Before you begin
- Complete DNS validation and the initial Signals installation.
- Use a workspace member with management permission to activate Path B and copy its forwarding block.
- Have access to deploy your website’s rewrite or reverse-proxy configuration and edit the installed script tag.
- Configure an exact HTTPS website domain for verification. Check whether visitors land on the apex domain,
www, or another hostname. - Keep your consent integration in place. Same-origin forwarding does not grant advertising consent.
How Plainrouter selects a path
Path A sends collection traffic through your Plainrouter-managed subdomain. Path B transparently forwards a route on your website to the same collector. Path B does not run Plainrouter code in your hosting account and does not change which visitors are eligible for measurement.
Path A is the default and remains fully supported. Path B gives supported stacks a true same-origin route for consented, server-issued browser identifiers. Both paths send identity-free arrivals independently of consent and require full consent for conversion events and advertising identity.
Generate your setup
1
Open the serving setup
Open Signals → Install and expand Advanced: same-origin proxy. Before the first arrival, the same installation instructions are also available directly on Dashboard and Signals. You do not need to wait for traffic to access forwarding setup.When Path B is already selected, Advanced: same-origin proxy opens automatically so the forwarding instructions are visible. With the default managed-hostname path, expand it when you want to configure forwarding.
2
Let Plainrouter check your hosting stack
Plainrouter checks bounded DNS and response-header evidence in the background. While the check is running, the page shows Pending and refreshes the stored result automatically.If the stack cannot be determined, answer Where is your website hosted? with the exact provider or server, then click Detect hosting.
3
Copy the generated block
Plainrouter shows one block for the detected stack. For Path B, click Activate Path B first, then Copy code and add the complete block to your hosting configuration. Do not edit its generated prefix, destination, or secret.For Path A, keep the displayed CNAME in place. Plainrouter manages the collector and HTTPS certificate behind it.
4
Use the public same-origin script path
For Path B, replace the existing Signals script tag’s Replace
src with the public route on your website. Use the prefix from the source side of your generated forwarding block:YOUR_GENERATED_PREFIX with your generated prefix. Keep the existing signalq("init", ...) block and publishable key before this tag. Replace the old tag rather than loading both copies.The browser URL contains the public prefix only. The upstream destination and forwarding secret belong in the hosting configuration. Activating Path B and deploying a rewrite do not change an already-installed script tag.5
Verify the live path
Deploy the hosting change and load your live website. The First arrival check turns green after Plainrouter stores the first valid arrival.For Path B, also click Run verification. The side-effect-free forwarding probe checks the deployed route without creating an event or arrival. Path B turns green only after both the probe passes and an authenticated arrival is observed.
Path B forwarding requirements
Install the entire generated block. Transparent forwarding must preserve:- The original host and visitor path.
CookieandSet-Cookiein both directions.- Request methods, bodies, content types, and the headers included in the generated configuration.
POST /v1/arrival through the generated prefix. Loading the website document alone is not the arrival transport. The snippet omits cookies from its arrival request, and the collector does not set visitor cookies in its arrival response. Cookie forwarding remains necessary for the separate consented event and identity routes.
Exact site domains
Configure the HTTPS origin visitors actually use.https://example.com and https://www.example.com are different origins. The forwarding probe requires an exact domain; a wildcard-only configuration does not provide a probe target. Add the apex domain explicitly when you need apex coverage.
Managed-hostname browser collection also requires an exact origin for credentialed CORS. Wildcards do not grant that coverage. Correctly configured Path B stays on the website origin and does not need a CORS preflight. If an OPTIONS request or CORS error appears, inspect whether an old script URL, explicit endpoint override, or redirect moved collection to another origin. Do not add Access-Control-Allow-Origin: * to fix credentialed requests; see MDN’s credentialed CORS guidance.
Rotate a Path B secret
Click Rotate forwarding secret, copy the newly generated block, and deploy it. Plainrouter accepts both the old and new secret during the transition. The overlap ends when Plainrouter successfully ingests the first authenticated arrival using the new secret or when you click Confirm new secret installed. A malformed or failed request does not acknowledge the new secret or end the overlap. Keep the old deployment available until one of those conditions is met. The side-effect-free forwarding probe attests only the currently active secret. A probe signed with the pending overlap secret cannot mark the path verified or complete rotation. If tracker key storage is temporarily unavailable, the probe fails closed with a retryable response instead of recording a pass.Understand detection and verification states
What should I see in the Network panel?
Open the actual website origin, select Network, enable Preserve log, disable the browser cache for the check, and reload. Filter by the public forwarding prefix. Append the paths below to that prefix to find the full request URLs.
For example, a script served at
https://shop.example/YOUR_GENERATED_PREFIX/s/v4.js derives an events URL at https://shop.example/YOUR_GENERATED_PREFIX/v1/events. Configuration, identity, withdrawal and arrival requests keep that prefix too. An explicit endpoint in init overrides script-based endpoint selection; remove an obsolete override when switching to this generated route.
A successful Run verification probe proves forwarding, not a browser visit or Meta delivery. It does not create an arrival, set a visitor cookie, or end secret rotation. Complete the browser arrival check separately.
Troubleshoot
The script or collector route returns HTML, a redirect, or 404
Use the complete block generated for your hosting stack. Preserve its upstream TLS host/SNI configuration as well as the original website host. Do not replace the destination with a bare collector hostname or remove path segments to silence a
404.
The probe passes but Path B is waiting for its first arrival
- Confirm the browser is loading the prefixed script and sending the prefixed
POST /v1/arrivalon the configured website. - Inspect the response body and status. An HTML
200from the application is not a collector receipt. A429requires a later retry after the rate limit; a failed arrival is not retried by the snippet. - After correcting the issue, reload the page to create a new document and check for
202, then allow the dashboard to reflect stored ingestion.
track, or using the identity-free ingestion diagnostic does not substitute for this arrival. Conversely, an arrival alone does not prove the forwarding probe passed.
Arrivals work but conversions or visitor cookies do not
First check all three advertising permissions in your CMP integration. No visitor cookie on an arrival is expected; it is not evidence of broken forwarding. After a full grant, inspect the consented event response forSet-Cookie and the browser’s cookie-storage rejection reason, if any. The server-owned pr_vid first-party cookie is HttpOnly, so its absence from document.cookie is expected. Use the browser’s Application or Storage panel instead. MDN explains HttpOnly and Secure.
If the browser receives the cookie but later consented requests do not retain it, check HTTPS, the actual request hostname, browser storage restrictions, and whether the proxy strips Cookie or Set-Cookie. Keep both headers intact. Do not add cookies to the identity-free arrival request as a workaround.
CSP blocks the script or a request
Check the browser console for the blocked URL and directive. The same-origin script needs permission under your site’sscript-src; collector requests need permission under connect-src. Allowing 'self' in the applicable directive covers the same-origin route, subject to your complete policy. Keep your existing nonce or hash treatment for the inline initialization block.
Do not replace the entire policy with an example allowlist or disable CSP. Follow the pixel CSP instructions and MDN’s connect-src reference. Meta’s external script remains a separate permission after you connect a dataset.