Add the browser script at the edge
Makes Cloady add the browser monitoring script tag before `</head>` of every HTML page the app's address and custom domains serve, with no code change or redeploy, or stop adding it with `edge: null`. The settings are kept in the app variable CLOADY_BROWSER_MONITORING and apply on the next page load; no service restarts. A page whose head already carries the script keeps its own. Answers 400 when the app has no web address, and 502 when the settings were saved but the app couldn't be reconciled, which repeating a request that sets `edge` retries. Needs the developer role.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/workspaces/string/apps/string/browser" \ -H "Content-Type: application/json" \ -d '{ "edge": { "replay": 0, "mask": "text", "goal": "string" } }'{ "edge": { "replay": 0, "mask": "text", "goal": "string", "tag": "string" }}Read browser monitoring GET
Returns the app's public browser key, the script URL and the hosts allowed to send beacons, from which the snippet is built, when the newest beacon arrived and the settings its snippet carries, the tag Cloady adds at the edge if it adds one, and LCP p75 and active sessions over the range once pages send beacons. Browser monitoring is on while the app's pages carry the snippet, whose own attributes set replay share, masking and the conversion goal, or while Cloady adds it at the edge, whose settings are the one thing stored: the app variable CLOADY_BROWSER_MONITORING.
Download a session recording GET
Returns the session's recording as compressed rrweb segments, masked in the visitor's browser. Recordings are kept for 72 hours, apart from the app's other logs, so queryAppLogs cannot read them. A long session can return several megabytes. Needs the developer role, since recordings show what the app's visitors saw.