Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!

API Request for Segment Pageviews

Avatar

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

Avatar

Employee Advisor

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?

Avatar

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?

Avatar

Employee Advisor

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.

Avatar

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

Avatar

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​.