Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Adobe Analytics Reporting API

Avatar

Level 3

I am using Adobe Analytics Reporting API, where I have a custom dimension 'Page Name' and 'UserID'. 'Page views' and 'Unique Visitor' are the metrics that we want. Using the API we want a breakdown of every Page Name with the User ID - page views and unique visitors metrics.

 

However, we are unable to get the desired response. Could someone help on this?

 

Thanks.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Level 4

Hi @jane_12 

If you are looking for both dimensions to be returned at once in the single ranked request, this isn't possible by design
Although, you can generate a request where a single page is broken down by the unique visitor ID.

To generate the data you require you will need to do two types of requests, one for all the pages and the other were you breakdown the pages by the visitor ID. This second request will need to be done for each page view. The only other prerequisite is that the visitor ID will need to be captured in a prop or an eVar.

Here is a link for more information on this:

Step 1 - Generate the list of the pages

First, you would need a request to generate the list of the pages, the following request should do:
{
  "rsid": "YOUR_RSID",
  "globalFilters": [
    { "type": "dateRange", "dateRange": "2025-07-01T00:00:00.000/2025-07-31T23:59:59.999" }
  ],
  "metricContainer": {
    "metrics": [
      { "id": "metrics/pageviews" },
      { "id": "metrics/visitors" }
    ]
  },
  "dimension": "variables/page",
  "settings": { "limit": 5000, "countRepeatInstances": true, "dimensionSort": "asc" }
}​

You can get more info on this from: https://developer.adobe.com/analytics-apis/docs/2.0/guides/endpoints/reports/ 

 

The generated list will give you the item IDs and the values for the pages.

Step 2 - Loop the breakdown

For each item in the list generated you would need to loop through them individually and generate a break down for them.
The request would look similar to the below, I have used eVar42 as value that captures the user ID but this would be changes to the dimension you use :
{
  "rsid": "YOUR_RSID",
  "globalFilters": [
    { "type": "dateRange", "dateRange": "2025-07-01T00:00:00.000/2025-07-31T23:59:59.999" }
  ],
  "metricContainer": {
    "metrics": [
      { "id": "metrics/pageviews" },
      { "id": "metrics/visitors" }
    ],
    "metricFilters": [
      {
        "id": "bf1",
        "type": "breakdown",
        "dimension": "variables/page",
        "itemId": "123456789"
        // or: "itemValue": "Home"
      }
    ]
  },
  "dimension": "variables/evar42",
  "settings": { "limit": 50000, "countRepeatInstances": true }
}​

 

*If you want to only look at specific pages, you can use their values instead of the itemId.


Hope this helps.
Dan

Avatar

Level 4

Update:
I noticed the link I used in the reply was broken:
https://developer.adobe.com/analytics-apis/docs/2.0/guides/endpoints/reports/breakdowns/ 

Avatar

Community Advisor

Hi @jane_12 ,

 

You basically want a nested breakdown in Adobe Analytics Reporting API:

  • Level 1: Page Name
  • Level 2: User ID
  • Metrics: Page Views and Unique Visitors
The problem is that the Reporting API v2.0 requires you to explicitly define dimension nesting (breakdowns) inside the reportDescription JSON.
 
Example:

POST https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/reports
x-api-key: {API_KEY}
x-proxy-global-company-id: {GLOBAL_COMPANY_ID}
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"rsid": "{REPORT_SUITE_ID}",
"globalFilters": [
{
"type": "dateRange",
"dateRange": "2024-07-01T00:00:00/2024-07-31T23:59:59"
}
],
"metricContainer": {
"metrics": [
{ "id": "metrics/pageviews" },
{ "id": "metrics/uniquevisitors" }
]
},
"dimension": "variables/pagename",
"settings": {
"limit": 50,
"page": 0
},
"search": {
"clause": ""
},
"children": [
{
"dimension": "variables/userid",
"settings": {
"limit": 50
}
}
]
}

 

Key things to check
Custom Dimension Names
Adobe API uses internal IDs for variables.
  • For Page Name, it’s usually variables/pagename.
  • For your custom UserID, it might be something like variables/evarXX (where XX is your eVar number). You can confirm in Admin > Report Suite > Edit Settings > Conversion Variables.
Breakdown Logic
In API v2.0, children specifies the breakdown dimension.
  • First level: dimension
  • Second level: inside children.
Pagination
  • If you have a lot of pages or users, you’ll need to paginate results with page and limit.
Unique Visitors Granularity
  • The "Unique Visitors" metric will be calculated for each breakdown (i.e., each Page Name / UserID combination) within the selected date range.
  • If you want true unique visitors per user across all pages, that’s a different segmenting logic.

Thanks.

Pradnya

Avatar

Level 3

we have tried both ways but we are getting just onde dimension data in our response.

Avatar

Level 4

Hi @jane_12,

What you can try, if you are comfortable using the API, is enable debugging:

 

EurosIMS_0-1754910434455.png

 

Once your report is generated, you can click on the 'bug' icon in the Workspace to let Adobe generate a JSON that should allow you to extract a copy of the report via API using that code.

 

EurosIMS_1-1754910628515.pngEurosIMS_2-1754910668257.png

 

 

 

Avatar

Level 3

this was the very first approach we did, however the response we are getting is not correct.