John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.data.html">data</a> . <a href="analytics_v3.data.realtime.html">realtime</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 78 | <code><a href="#get">get(ids, metrics, filters=None, dimensions=None, sort=None, max_results=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 79 | <p class="firstline">Returns real time data for a view (profile).</p> |
| 80 | <h3>Method Details</h3> |
| 81 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 82 | <code class="details" id="get">get(ids, metrics, filters=None, dimensions=None, sort=None, max_results=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 83 | <pre>Returns real time data for a view (profile). |
| 84 | |
| 85 | Args: |
| 86 | ids: string, Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 87 | metrics: string, A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. (required) |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 88 | filters: string, A comma-separated list of dimension or metric filters to be applied to real time data. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 89 | dimensions: string, A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 90 | sort: string, A comma-separated list of dimensions or metrics that determine the sort order for real time data. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 91 | max_results: integer, The maximum number of entries to include in this feed. |
| 92 | |
| 93 | Returns: |
| 94 | An object of the form: |
| 95 | |
| 96 | { # Real time data for a given view (profile). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 97 | "columnHeaders": [ # Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 98 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 99 | "dataType": "A String", # Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. |
| 100 | "columnType": "A String", # Column Type. Either DIMENSION or METRIC. |
| 101 | "name": "A String", # Column name. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 102 | }, |
| 103 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 104 | "selfLink": "A String", # Link to this page. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 105 | "totalsForAllResults": { # Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. |
| 106 | "a_key": "A String", # Key-value pair for the total value of a metric. Key is the metric name and the value is the total value for that metric. |
| 107 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 108 | "kind": "analytics#realtimeData", # Resource type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 109 | "rows": [ # Real time data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. |
| 110 | [ |
| 111 | "A String", |
| 112 | ], |
| 113 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 114 | "query": { # Real time data request query parameters. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 115 | "ids": "A String", # Unique table ID. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 116 | "metrics": [ # List of real time metrics. |
| 117 | "A String", |
| 118 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 119 | "filters": "A String", # Comma-separated list of dimension or metric filters. |
| 120 | "sort": [ # List of dimensions or metrics based on which real time data is sorted. |
| 121 | "A String", |
| 122 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 123 | "dimensions": "A String", # List of real time dimensions. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 124 | "max-results": 42, # Maximum results per page. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 125 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 126 | "id": "A String", # Unique ID for this data response. |
| 127 | "profileInfo": { # Information for the view (profile), for which the real time data was requested. |
| 128 | "accountId": "A String", # Account ID to which this view (profile) belongs. |
| 129 | "profileName": "A String", # View (Profile) name. |
| 130 | "webPropertyId": "A String", # Web Property ID to which this view (profile) belongs. |
| 131 | "profileId": "A String", # View (Profile) ID. |
| 132 | "tableId": "A String", # Table ID for view (profile). |
| 133 | "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs. |
| 134 | }, |
| 135 | "totalResults": 42, # The total number of rows for the query, regardless of the number of rows in the response. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 136 | }</pre> |
| 137 | </div> |
| 138 | |
| 139 | </body></html> |