Integration Overview

473 views

Published on

Published in: Career
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
473
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integration Overview

  1. 1. WebSpectator for Publishers IntegrationServices Overview USA (HQ) 100 Wilshire Blvd Santa Monica CA, 90401 United States Phone: (+1) 310 566 0340 Brazil Avenida das Nações Unidas, 11.541, 14º Andar 04578-907 São Paulo Phone: (+55) 11 5504 3350 United Kingdom 23 Berkeley Square London, W1J 6HE Phone: (+44) 2032 869092 Portugal Rua Fernando Namora, 4 2º Piso A, Ed. Metropolitan Business Center 2675-487 Odivelas Phone: (+351) 21 934 03 22
  2. 2. Contents Summary............................................................................................................................................................ 2 Overview............................................................................................................................................................ 3 API Samples ....................................................................................................................................................... 4 Real-time ....................................................................................................................................................... 4 Get application data .................................................................................................................................. 5 Get campaign data .................................................................................................................................... 6 Integration services ....................................................................................................................................... 7 Auto-monetizer report by date ................................................................................................................. 7 Auto-monetizer report by website ............................................................................................................ 8 Sample dashboard and report ........................................................................................................................... 9 WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 1 21-02-2014
  3. 3. Summary This document presents a high-level overview about the WebSpectator services and integration API to provide the necessary means for clients and third-parties data consuming. WebSpectator offers a consistent, reliable and scalable integration infrastructure, so real-time and reporting data can easily be consumed by any authorized user, despite of the location or the device he is accessing from. WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 2 21-02-2014
  4. 4. Overview The figure below shows the overall picture of the WebSpectator, differentiating how real-time and other type of data can be consumed from the system. WebSites BackOffice Others Consume real-time data (dashboards) ORTC Consume reporting data Integration services Internal services and data processing Data storage (business data, real-time data, reports data) All the data collected from WebSpectator powered applications is processed, aggregated and stored in databases, using both on-disk and in-memory approaches to persist historically data, as long as offering a fast access to most recent available data. Real-time data, typically for dashboards, is queried and consumed using a third-party component called ORTC, a real-time infrastructure used to accomplish bidirectional communication between WebSpectator servers and clients, based on a publish/subscribe pattern, providing integration API for several well-known languages (.Net, Java, Android, iOS, etc.).WebSpectator BackOffice, for example, feeds dashboards realtime data using JavaScript API, sending and receiving JSON messages. Other type of logged data, used for reports and graphics, can be accessed via WebSpectator Integration Services, a HTTP based services layer replying with JSON formatted responses. WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 3 21-02-2014
  5. 5. API Samples The following sections show examples of using each one of the integration API. Real-time Prior to present samples on using this API, it is important to explain how authenticationis done and messages are sent and received in ORTC system. Each application is given a unique key used to identify it in the ORTC services and to get an authentication token. The application key and token are then used toconnect the client to the server and authorize each request. Real-time messages from the server are received in the client subscribing to channels, using asynchronous callbacks to process each response. Once the connection is successfully established, client subscribes to real-time channels, sending a message signaling WebSpectator it wants to be notified on a period basis about certain types of data. Such a request is sent using aJSON message, with the following structure: Request Property queryName Description Real time query to execute and to retrieve data back to client. action Action to be performed for the specified query. Client sends a start message to begin accepting data messages from server. When no more data is intended to be received (e.g. the user leaves the page or the application), client sends a stop message. The identifier of the application client wants to monitor. The identifier of the entity being queried. A session identifier generated by the client. Frequency (seconds) the query will be executed with and data returned to the client processing callback. Number of minutes client wants data grouped by (granularity). Timespan in hours data will be fetched until now, i.e. get data from the last specified number of hours. applicationId entityId clientId interval dataResolution hours WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 4 Sample values ApplicationRTDataQuery AdUnitRTDataQuery TopZonesForApplicationRTDataQuery OrderLineRTDataQuery start | stop Integer > 0 Integer > 0 String Integer > 0 Integer >= 0; if 0, no grouping occurs Integer > 0 21-02-2014
  6. 6. Get application data Thissample requests application real-time data within the last 24 hours at a 1 second rate. Request { "queryName": “ApplicationRTDataQuery”, "action": “start”, "applicationId": “1”, “entityId”: “1”, "clientId": “e4r6”, "interval": 1, "dataResolution": 0, "hours": 24 } Response { "identifier": { "queryName": "ApplicationRTDataQuery", "queryInstanceId": 1581393908, "entityId": 1, "resolution": 0, "fromDate": "2014-01-17 17:00:10" } "data": { "gtsImpressions": 49556, "activeDuration": 312388.71161436767, "outOfFocusClosedSessionsDuration": 2670455.4712917875, "idleDuration": 2381.779970418662, "traditionalImpressions": 55252, "engagedUsers": 302, "potentialSecondPrintGts": 0, "totalUsers": 2357, "weeklyVisitors": 268, "totalUsersMax": 9108, "idleUsers": 5, "avgActiveTimeOnApp": 25.189255281403234, "engagedClosedSessionsDuration": 494618.11867029744, "closedSessions": 11246, "totalDuration": 3745416.2629115265, "monthlyVisitors": 261, "iabImpressions": 24409, "totalUsersMin": 1, "engagedDuration": 562539.3290029807, "avgTotalTimeOnApp": 306.8555737885075, "dailyVisitors": 268, "avgIdleTimeOnApp": 0.2263763088039973, "activeUsersMin": 0, "potentialContinuousGts": 0, "outOfFocusUsersMax": 5925, "idleUsersMax": 77, "engagedUsersMin": 0, "outOfFocusUsersMin": 0, "engagedUsersMax": 368, "potentialGts": 0, "idleUsersMin": 0, "activeUsers": 677, "totalClosedSessionsDuration": 3450897.7828255557, "idleClosedSessionsDuration": 2545.8279688097537, "outOfFocusDuration": 2868106.44232376, "activeClosedSessionsDuration": 283278.3648946608, "avgEngagedTimeOnApp": 43.98169292817868, "activeUsersMax": 3138, "outOfFocusUsers": 1373, "pageviews": 436, "avgOutOfFocusTimeOnApp": 237.4582492701216, "anonymousPageviews": 0 }, } WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 5 21-02-2014
  7. 7. Get campaign data This sample requests campaign real-time data within the last 24 hours at a 1 second rate. Request { "queryName": “OrderLineRTDataQuery”, "action": “start”, "applicationId": “1”, “entityId”: “123”, "clientId": “e4r6”, "interval": 1, "dataResolution": 0, "hours": 24 } Response { "identifier": { "queryName": "OrderLineRTDataQuery", "queryInstanceId": 1581454523, "entityId": 123, "resolution": 0, "fromDate": "2014-01-17 17:00:10" } "data": { "gtsImpressions": 49556, "activeDuration": 312388.71161436767, "outOfFocusClosedSessionsDuration": 2670455.4712917875, "idleDuration": 2381.779970418662, "traditionalImpressions": 55252, "engagedUsers": 302, "potentialSecondPrintGts": 0, "totalUsers": 2357, "weeklyVisitors": 268, "totalUsersMax": 9108, "idleUsers": 5, "avgActiveTimeOnApp": 25.189255281403234, "engagedClosedSessionsDuration": 494618.11867029744, "closedSessions": 11246, "totalDuration": 3745416.2629115265, "monthlyVisitors": 261, "iabImpressions": 24409, "totalUsersMin": 1, "engagedDuration": 562539.3290029807, "avgTotalTimeOnApp": 306.8555737885075, "dailyVisitors": 268, "avgIdleTimeOnApp": 0.2263763088039973, "activeUsersMin": 0, "potentialContinuousGts": 0, "outOfFocusUsersMax": 5925, "idleUsersMax": 77, "engagedUsersMin": 0, "outOfFocusUsersMin": 0, "engagedUsersMax": 368, "potentialGts": 0, "idleUsersMin": 0, "activeUsers": 677, "totalClosedSessionsDuration": 3450897.7828255557, "idleClosedSessionsDuration": 2545.8279688097537, "outOfFocusDuration": 2868106.44232376, "activeClosedSessionsDuration": 283278.3648946608, "avgEngagedTimeOnApp": 43.98169292817868, "activeUsersMax": 3138, "outOfFocusUsers": 1373, "pageviews": 436, "avgOutOfFocusTimeOnApp": 237.4582492701216, "anonymousPageviews": 0 }, } WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 6 21-02-2014
  8. 8. Integration services All the available services included in this API accept as the first required parameter the account private key associated with each publisher. This key is validated and processed by the WebSpectator servers to authenticate and ensure authorized access to the requested information. Invalid authentication or unauthorized access result in an error being returned, as also invalid parameters specification (for example, inexistent website or start date greater than end date). Auto-monetizer report by date Arguments Key – Account private key DateStart – Report interval start date in the format “yyyy-MM-dd”, example: 2013-12-24 DateEnd – Report interval end date in the format “yyyy-MM-dd”, example: 2013-12-31 Websites – Optional argument, list of websites public keys separated by comma Request http://wsp.webspectator.com/PublicServices/GetAutoMonetizerReportByDate?key=[accountkey]& dateStart=[yyyy-mm-dd]&dateEnd=[yyyy-mm-dd]&websites=[websites-public-key] Response { "result": [ { "date": "2013-12-29", "revenue": 106.505, "click": 890, "print": 98155, "ctr": 0.907, "ecpm": 1.085 }, { "date": "2013-12-30", "revenue": 127.86, "click": 1151, "print": 120025, "ctr": 0.959, "ecpm": 1.065 } ], "total": { "revenue": 234.365, "click": 2041, "print": 218180, "ctr": 0.935, "ecpm": 1.074 } } WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 7 21-02-2014
  9. 9. Auto-monetizer report by website Arguments Key – Account private key DateStart – Report interval start date in the format “yyyy-MM-dd”, example: 2013-12-24 DateEnd – Report interval end date in the format “yyyy-MM-dd”, example: 2013-12-31 Websites – Optional argument, list of websites public keys separated by comma Request http://wsp.webspectator.com/PublicServices/GetAutoMonetizerReportByWebsite?key=[accountke y]&dateStart=[yyyy-mm-dd]&dateEnd=[yyyy-mm-dd]&websites=[websites-public-key] Response { "result": [ { "website": "xpto.org", "revenue": 30.54, "click": 317, "print": 21177, "ctr": 1.497, "ecpm": 1.442 }, { "website": "example.com", "revenue": 13.47, "click": 75, "print": 13713, "ctr": 0.547, "ecpm": 0.982 } ], "total": { "revenue": 44.01, "click": 392, "print": 34890, "ctr": 1.124, "ecpm": 1.261 } } WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 8 21-02-2014
  10. 10. Sample dashboard and report The figures show examples of how real-time and reporting data can be organized to present a complete overview about an application or campaign. WSP v2.0 –Integration Services Overview Ref:#WS- 201401RF-NP 9 21-02-2014

×