Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

API Request for Segment Pageviews

chrisw55984319
Level 1
Level 1

Hi, I'm trying to do an API request but am struggling to get it to work. I'd like to return pageviews by day for a given segment - just need the total pageviews, pageviews by page isn't important. Below is what I'm trying. What am I doing wrong? I'm trying to put this into Klipfolio through its Adobe Analytics data source if that impacts things.

{

"reportDescription":{

"reportSuiteID": "myrsid",

"dateFrom" : "2017-07-24",

"dateTo":"2017-07-28",

"dateGranularity":"day,

"metrics": [ {"id" : "pageviews"} ], "elements":[{"id":"page"}], "segments":[{"id":"s300002169_59517b268f0c6535eca2dddf"}]

},

"currentdata":true

}

5 Replies
ishans52004352
Employee
Employee

Hi chrisw71367065

Looks good to me. Except the double quote end " after day, which is missing in the above API request - this could lead to syntax error.

What is the issue seen?

chrisw55984319
Level 1
Level 1

Thanks for the reply, ishans9314858​. I actually have the " after day, it just accidentally didn't get pasted here.

Would it make a difference if Klipfolio is still using version 1.3 of the API?

ishans52004352
Employee
Employee

Yes,it may. Version 1.3 didn't have Report.Queue. Instead, there were Report.QueueTrended and all.

You may want to refer to Developer Connection | Adobe Developer Connection  to go through documentation of 1.3.

chrisw55984319
Level 1
Level 1

I confirmed that it is using version 1.4. When creating the data source they have different report type selections (Trended, Overtime, Ranked, SCMRanked) which I guess use different methods but I tried all of them and none work.

Is there a way I could use one of their custom data sources options instead of the pre-built Adobe Analytics options to retrieve Adobe Analytics data? Something like what's pictured? I'm not sure what the query URL would be and there is nowhere to enter a request like the one above.

klipfolio-data source setup.PNG

chrisw55984319
Level 1
Level 1

I determined that the reason for the error was because it was trying to force the request into one of Klipfolio's pre-defined Adobe Analytics report types instead of doing a "build your own" custom query.

Thanks for your help though, ishans9314858​.