API Request for Segment Pageviews

Avatar

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
chrisw55984319
Level 1

01-08-2017

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

}

Replies

Avatar

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

155 likes

Total Posts

330 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

155 likes

Total Posts

330 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
ishans52004352
Employee

01-08-2017

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

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
chrisw55984319
Level 1

01-08-2017

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

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

155 likes

Total Posts

330 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

155 likes

Total Posts

330 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
ishans52004352
Employee

01-08-2017

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

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
chrisw55984319
Level 1

01-08-2017

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

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
chrisw55984319
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
chrisw55984319
Level 1

01-08-2017

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