Set the heatmap-capture override
Turn heatmap capture on or off for a location. Requires an agency key (ak_) and ?location_id=; viewer keys get 403 agency_required.
Accepted values for capture_heatmaps:
true— capture click positions and scroll depth with SDK defaults. -{ "flushIntervalMs": 5000, "maxBufferPoints": 200 }— on, with those overrides.flushIntervalMsmust be 1000–60000 andmaxBufferPoints10–1000; values outside the range are rejected rather than clamped, and unknown keys are rejected rather than ignored.false/null— off. Both mean the same thing here.
Capture adds one event per click and one per page-scroll, so this is off until asked for. The override is served to the SDK via remote config and wins over the site's init() configuration — which is the point: an agency can enable heatmaps on a client site whose install snippet it cannot edit. Browsers pick it up on their next remote-config fetch.
Two cases where it does not apply: a site with disable_remote_config: true never fetches remote config, and HIPAA-mode locations never capture heatmaps regardless of what is stored.
Turning capture on is not retroactive — there is no backfill of past traffic. Read the data with the Heatmaps API.
curl -X PUT "https://mythic-analytics.gulp.workers.dev/client/v1/settings/heatmaps" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"capture_heatmaps": true
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/settings/heatmaps"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"capture_heatmaps": true
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/settings/heatmaps", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"capture_heatmaps": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"capture_heatmaps": true
}`)
req, err := http.NewRequest("PUT", "https://mythic-analytics.gulp.workers.dev/client/v1/settings/heatmaps", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/settings/heatmaps')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"capture_heatmaps": true
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"capture_heatmaps": true
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
/heatmaps
Target server for requests. Edit to use your own host.
Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.The media type of the request body
true, false, null, or { flushIntervalMs, maxBufferPoints }.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Body
true, false, null, or \\{ flushIntervalMs, maxBufferPoints \\}.
true