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!
SOLVED

Real Time Dashboard - using the REST API 1.4 - How to use segmentation

Avatar

Level 1

Hi All,

I am started working with real-time dashboards using the 1.4 REST API.

I can use the "basic" stuff - but when i try to search for specific pages or the server variable i get into trouble.

Can anyone tell me what is wrong here:

                                                                                        
var method ='Report.Run';
  
 var params = {
 "reportDescription":{
 "source": "realtime",
 "reportSuiteID": config.reportSuite,
 "dateFrom": "-60 minutes",
 "dateGranularity": "minute:1",
 "metrics": [
 { "id": "pageviews" }
 ], "elements": [
 { "id": "page","top":"20"}
 ],
 "segments": [
 {
 "element": "page",
 "selected": ["/DA/"]
 }
 ],
 }
  
 };

...alternatively how i select a specific value for the variable server...pls help me in the right direction.

/Peter

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Peter,

Check out this example and see if the code helps under:

//Multiple elements with search 

Best,

Ryan

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Hi Peter,

Check out this example and see if the code helps under:

//Multiple elements with search 

Best,

Ryan