Filter values that exist for one page
Devices, sources and mediums with the session count behind each — what a filter UI should be built from.
Scoped to sessions that have points ON that page, not to the location's traffic. A dropdown offering desktop when no desktop visitor ever reached the page produces an empty heatmap and reads as a bug, so every value returned here yields at least one row.
Fetch these unfiltered. If the facets themselves are filtered, narrowing one dimension empties the others and leaves no way back.
curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap/facets?location_id=example_string&url=acme.com%2Fpricing&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap/facets?location_id=example_string&url=acme.com%2Fpricing&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap/facets?location_id=example_string&url=acme.com%2Fpricing&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap/facets?location_id=example_string&url=acme.com%2Fpricing&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z", nil)
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/data/heatmap/facets?location_id=example_string&url=acme.com%2Fpricing&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"page": "acme.com/pricing",
"device_type": [
{
"value": "mobile",
"sessions": 412
}
],
"utm_source": [
{
"value": "mobile",
"sessions": 412
}
],
"utm_medium": [
{
"value": "mobile",
"sessions": 412
}
]
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
/client/v1/data/heatmap/facets
Target server for requests. Edit to use your own host.
Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.
ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.Required with an agency key (ak_); ignored with a location key (sk_). Can also be sent as the X-Location-Id header.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.
Query Parameters
Required with an agency key (ak_); ignored with a location key (sk_). Can also be sent as the X-Location-Id header.
acme.com/pricing