Add Domain/Subdomain Filtering to Container Analytics API

Feature Request: Add Domain/Subdomain Filtering to Container Analytics API

Endpoint: GET /api/v2/containers/{identifier}/analytics/clients

Current Value: This endpoint provides excellent visibility into client requests and events per date, including breakdowns by client (e.g., GA, GTM) and event types (e.g., PageView, ScriptLoad) with metrics like count, adBlock, safari, etc.

Issue: It lacks filtering options, making it hard to isolate usage when a single container serves multiple custom subdomains.

Use Case: For an sGTM container with 2+ custom subdomains (e.g., analytics.domain1.com vs. analytics.domain2.com), we’d like to compare client/event usage per subdomain to optimize resource allocation and troubleshooting.

Proposed Enhancement: Add a query parameter like ?domains=domain1.com,domain2.com or ?subdomain_filter=analytics.domain1.com to return filtered analytics (same schema, but scoped to specified domains/subdomains).

Example Current Response Structure (for Reference):

[
  {
    "date": 1764720000,
    "clients": [
      {
        "name": "GA",
        "events": [
          {
            "name": "PageView",
            "count": 15,
            "adBlock": 1,
            "safari": 7,
            "gcsGranted": 15,
            "gcsNotGranted": 0,
            "gcsUndefined": 0,
            "botDetected": 0
          }
          // ... other events
        ]
      }
      // ... other clients
    ]
  }
  // ... other dates
]

This would greatly enhance multi-domain container management. Thanks for considering!

Hey @shahzadaalihassan
Thank you for your suggestion. We plan to add this improvement to the interface and API.

Unfortunately, this is still in the backlog, so I cannot give you any implementation dates.