Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Analytics Champion Program are open!
SOLVED

Use value with itemId in breakdown report, API 2.0

Avatar

Level 1

I'm working on code to invoke AA API 2.0 requests to grab metrics for a breakdown report.  I have the code working according the the Reporting Guide, but the use of itemId is inconvenient.  I would like to breakdown by dimension value, not dimension itemId.  Is this possible?

Here is what I'm doing now:

Request report on dimension "variables/prop18", which in my case is "user".  The response has a row for each user, with itemId (AA internal identifier) and value (my user id).

itemId
value
83849549028fred
937292847219barney
4837294937Wilma

Loop over each row, requesting report on dimension "variables/prop2", which in my case is "page",  filtered for a single row from the first result:

    "dimension": "variables/prop2",

    "metricContainer": {

         "metrics": [

             {

                 "id": "metrics/pageviews",

                 "columnId": "pageviews",

                 "filters": ["f0"]

             },

             {

                 "id": "metrics/visits",

                 "columnId": "visits",

                 "filters": ["f0"]

             }

         "metricFilters": [

             {

                 "id": "f0",

                 "type": "breakdown",

                 "dimension": "variables/prop18",

                 "itemId": "83849549028"

             }

     ]

 

When I get the response, each row has the itemId and value for dimension variables/prop2, plus the metrics.

Here are my questions:

1. Is there a way to setup the metricFilters based on the the value of prop18, instead of the itemId?

2. If I have to filter by itemId, is there a way to

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

ItemId is required, unfortunately. You can do a filter to get the Item ID, though: https://github.com/AdobeDocs/analytics-2.0-apis/blob/a7cff208f309519703fe5bc62327aaddddf7bebc/report...  

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

ItemId is required, unfortunately. You can do a filter to get the Item ID, though: https://github.com/AdobeDocs/analytics-2.0-apis/blob/a7cff208f309519703fe5bc62327aaddddf7bebc/report...  

Avatar

Level 5

I know this is an old thread - but is there any progress on this?  

 

If I have a sheet that takes an input from a user, say:
Campaign = "Email" or "affiliate"

 

How do I dynamically convert that term  "Email" or the term "Affiliate" into an ID that Adobes AA API can then read?

Calling the Dimensions/ endpoint is too generic and does not provide exact ids to be later added to a list for users to choose from

Should I just call a blank report once to get a list of "Values" (customer facing) and their corresponding "Ids"?

Avatar

Level 1
I am having the same issue. Since the last solution was posted two years ago, I would like to pick it up again. Is there any news on this topic?