Skip to main content

Analytics Detection API

developer
GET/v1/domain/analytics

Discovers analytics, tracking, error-monitoring, feature-flag, and consent-management tools on a website. Goes beyond marketing pixels — also detects production developer-tooling SDKs (Sentry, Datadog RUM, Rollbar, LogRocket, New Relic, Bugsnag), feature-flag platforms (LaunchDarkly, Statsig, GrowthBook, Optimizely, Split.io, ConfigCat, Unleash), and CMPs (OneTrust, Cookiebot, CookieYes, Iubenda, Termly, Osano, TrustArc).

What It Does

Scans HTML source, inline scripts, and script source URLs for analytics scripts, tracking pixels, marketing tags, error-monitoring SDKs, feature-flag SDKs, and consent-management platforms. Each detection is tagged with a sub-category (analytics, tag-manager, conversion-pixel, session-replay, heatmap, chat, error-monitoring, feature-flag, cmp). Extracts ALL matching tool IDs (catches GA UA+G dual-config during migrations) and surfaces consent-mode-deferred GTM via dataLayer initialization patterns.

Why It's Useful

A full inventory of the modern dev + marketing + privacy stack in one call. Privacy officers get the consent layer + every tracker for GDPR/CCPA documentation. Dev-tool sales teams see whether prospects already use a competitor (Sentry vs Datadog, LaunchDarkly vs Statsig). MarTech audits catch dual-tracking-ID migrations that single-ID detectors silently hide.

Use Cases

Marketing Operations

MarTech Audit

Audit analytics implementations to ensure all tracking is properly deployed and no duplicates exist.

Ensure data quality by identifying tracking gaps or duplicates.

Privacy Officer

Privacy Compliance

Identify all tracking technologies for privacy policy documentation and consent management.

Maintain GDPR/CCPA compliance with complete tracking inventory.

Growth Manager

Competitive Intelligence

Analyze competitor analytics stacks to understand their measurement approach.

Identify analytics tools to consider for your own stack.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to detect analytics forExample: example.com

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
domainstringThe queried domain
analyticsarrayDetected tools, each with name, category (analytics | tag-manager | conversion-pixel | session-replay | heatmap | chat | error-monitoring | feature-flag | cmp), confidence, evidence, toolId (first ID, backward-compat), and toolIds (all extracted IDs — important for dual-config migrations)
countnumberTotal number of tools detected across all categories
byCategoryobjectTools grouped by sub-category (e.g., { "analytics": ["Google Analytics"], "error-monitoring": ["Sentry"], "cmp": ["OneTrust"] }) — convenience accessor for dashboards and MCP consumers

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/domain/analytics?domain=example.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/domain/analytics?domain=example.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/domain/analytics?domain=example.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Analytics Detection guide

Learn the concepts, choose a practical workflow, and interpret the observations from Analytics Detection before acting on them. Run supported checks via MCP or through REST.

Read the guide →

    Related Endpoints

    External References

    Learn more about the standards and protocols behind this endpoint.

    Try This Endpoint

    Test the Analytics Detection endpoint live in the playground.

    Analytics Detection API Reference | EdgeDNS