blob: 8b892b4153c759514d915fe8b8e755c8281e19a9 [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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="partners_v2.html">Google Partners API</a> . <a href="partners_v2.analytics.html">analytics</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#list">list(pageSize=None, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, pageToken=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</a></code></p>
79<p class="firstline">Lists analytics data for a user's associated company.</p>
80<p class="toc_element">
81 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<h3>Method Details</h3>
84<div class="method">
85 <code class="details" id="list">list(pageSize=None, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, pageToken=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</code>
86 <pre>Lists analytics data for a user's associated company.
87Should only be called within the context of an authorized logged in user.
88
89Args:
90 pageSize: integer, Requested page size. Server may return fewer analytics than requested.
91If unspecified or set to 0, default value is 30.
92Specifies the number of days in the date range when querying analytics.
93The `page_token` represents the end date of the date range
94and the start date is calculated using the `page_size` as the number
95of days BEFORE the end date.
96Must be a non-negative integer.
97 requestMetadata_userOverrides_ipAddress: string, IP address to use instead of the user's geo-located IP address.
98 requestMetadata_trafficSource_trafficSubId: string, Second level identifier to indicate where the traffic comes from.
99An identifier has multiple letters created by a team which redirected the
100traffic to us.
101 requestMetadata_userOverrides_userId: string, Logged-in user ID to impersonate instead of the user's ID.
102 x__xgafv: string, V1 error format.
103 Allowed values
104 1 - v1 error format
105 2 - v2 error format
106 requestMetadata_locale: string, Locale to use for the current request.
107 pageToken: string, A token identifying a page of results that the server returns.
108Typically, this is the value of `ListAnalyticsResponse.next_page_token`
109returned from the previous call to
110ListAnalytics.
111Will be a date string in `YYYY-MM-DD` format representing the end date
112of the date range of results to return.
113If unspecified or set to "", default value is the current date.
114 requestMetadata_experimentIds: string, Experiment IDs the current request belongs to. (repeated)
115 requestMetadata_trafficSource_trafficSourceId: string, Identifier to indicate where the traffic comes from.
116An identifier has multiple letters created by a team which redirected the
117traffic to us.
118 requestMetadata_partnersSessionId: string, Google Partners session ID.
119
120Returns:
121 An object of the form:
122
123 { # Response message for
124 # ListAnalytics.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400125 "analyticsSummary": { # Analytics aggregated data for a `Company` for a given date range. # Aggregated information across the response's
126 # analytics.
Thomas Coffee2f245372017-03-27 10:39:26 -0700127 "profileViewsCount": 42, # Aggregated number of profile views for the `Company` for given date range.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400128 "searchViewsCount": 42, # Aggregated number of times users saw the `Company`
129 # in Google Partners Search results for given date range.
Thomas Coffee2f245372017-03-27 10:39:26 -0700130 "contactsCount": 42, # Aggregated number of times users contacted the `Company`
131 # for given date range.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400132 },
133 "analytics": [ # The list of analytics.
134 # Sorted in ascending order of
135 # Analytics.event_date.
136 { # Analytics data for a `Company` within a single day.
137 "searchViews": { # Details of the analytics events for a `Company` within a single day. # Instances of users seeing the `Company` in Google Partners Search results
138 # on the specified date.
139 "eventLocations": [ # Location information of where these events occurred.
140 { # An object representing a latitude/longitude pair. This is expressed as a pair
141 # of doubles representing degrees latitude and degrees longitude. Unless
142 # specified otherwise, this must conform to the
143 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
144 # standard</a>. Values must be within normalized ranges.
145 #
146 # Example of normalization code in Python:
147 #
148 # def NormalizeLongitude(longitude):
149 # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
150 # q, r = divmod(longitude, 360.0)
151 # if r > 180.0 or (r == 180.0 and q <= -1.0):
152 # return r - 360.0
153 # return r
154 #
155 # def NormalizeLatLng(latitude, longitude):
156 # """Wraps decimal degrees latitude and longitude to
157 # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
158 # r = latitude % 360.0
159 # if r <= 90.0:
160 # return r, NormalizeLongitude(longitude)
161 # elif r >= 270.0:
162 # return r - 360, NormalizeLongitude(longitude)
163 # else:
164 # return 180 - r, NormalizeLongitude(longitude + 180.0)
165 #
166 # assert 180.0 == NormalizeLongitude(180.0)
167 # assert -180.0 == NormalizeLongitude(-180.0)
168 # assert -179.0 == NormalizeLongitude(181.0)
169 # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
170 # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
171 # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
172 # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
173 # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
174 # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
175 # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
176 # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
177 # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
178 # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
179 #
180 # The code in logs/storage/validator/logs_validator_traits.cc treats this type
181 # as if it were annotated as ST_LOCATION.
182 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
183 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
184 },
185 ],
186 "eventCount": 42, # Number of times the type of event occurred.
187 # Meaning depends on context (e.g. profile views, contacts, etc.).
188 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700189 "contacts": { # Details of the analytics events for a `Company` within a single day. # Instances of users contacting the `Company`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400190 # on the specified date.
191 "eventLocations": [ # Location information of where these events occurred.
192 { # An object representing a latitude/longitude pair. This is expressed as a pair
193 # of doubles representing degrees latitude and degrees longitude. Unless
194 # specified otherwise, this must conform to the
195 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
196 # standard</a>. Values must be within normalized ranges.
197 #
198 # Example of normalization code in Python:
199 #
200 # def NormalizeLongitude(longitude):
201 # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
202 # q, r = divmod(longitude, 360.0)
203 # if r > 180.0 or (r == 180.0 and q <= -1.0):
204 # return r - 360.0
205 # return r
206 #
207 # def NormalizeLatLng(latitude, longitude):
208 # """Wraps decimal degrees latitude and longitude to
209 # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
210 # r = latitude % 360.0
211 # if r <= 90.0:
212 # return r, NormalizeLongitude(longitude)
213 # elif r >= 270.0:
214 # return r - 360, NormalizeLongitude(longitude)
215 # else:
216 # return 180 - r, NormalizeLongitude(longitude + 180.0)
217 #
218 # assert 180.0 == NormalizeLongitude(180.0)
219 # assert -180.0 == NormalizeLongitude(-180.0)
220 # assert -179.0 == NormalizeLongitude(181.0)
221 # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
222 # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
223 # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
224 # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
225 # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
226 # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
227 # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
228 # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
229 # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
230 # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
231 #
232 # The code in logs/storage/validator/logs_validator_traits.cc treats this type
233 # as if it were annotated as ST_LOCATION.
234 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
235 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
236 },
237 ],
238 "eventCount": 42, # Number of times the type of event occurred.
239 # Meaning depends on context (e.g. profile views, contacts, etc.).
240 },
241 "eventDate": { # Represents a whole calendar date, e.g. date of birth. The time of day and # Date on which these events occurred.
242 # time zone are either specified elsewhere or are not significant. The date
243 # is relative to the Proleptic Gregorian Calendar. The day may be 0 to
244 # represent a year and month where the day is not significant, e.g. credit card
245 # expiration date. The year may be 0 to represent a month and day independent
246 # of year, e.g. anniversary date. Related types are google.type.TimeOfDay
247 # and `google.protobuf.Timestamp`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700248 "month": 42, # Month of year. Must be from 1 to 12.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400249 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
250 # if specifying a year/month where the day is not significant.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700251 "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
252 # a year.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400253 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700254 "profileViews": { # Details of the analytics events for a `Company` within a single day. # Instances of users viewing the `Company` profile
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400255 # on the specified date.
256 "eventLocations": [ # Location information of where these events occurred.
257 { # An object representing a latitude/longitude pair. This is expressed as a pair
258 # of doubles representing degrees latitude and degrees longitude. Unless
259 # specified otherwise, this must conform to the
260 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
261 # standard</a>. Values must be within normalized ranges.
262 #
263 # Example of normalization code in Python:
264 #
265 # def NormalizeLongitude(longitude):
266 # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
267 # q, r = divmod(longitude, 360.0)
268 # if r > 180.0 or (r == 180.0 and q <= -1.0):
269 # return r - 360.0
270 # return r
271 #
272 # def NormalizeLatLng(latitude, longitude):
273 # """Wraps decimal degrees latitude and longitude to
274 # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
275 # r = latitude % 360.0
276 # if r <= 90.0:
277 # return r, NormalizeLongitude(longitude)
278 # elif r >= 270.0:
279 # return r - 360, NormalizeLongitude(longitude)
280 # else:
281 # return 180 - r, NormalizeLongitude(longitude + 180.0)
282 #
283 # assert 180.0 == NormalizeLongitude(180.0)
284 # assert -180.0 == NormalizeLongitude(-180.0)
285 # assert -179.0 == NormalizeLongitude(181.0)
286 # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
287 # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
288 # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
289 # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
290 # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
291 # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
292 # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
293 # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
294 # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
295 # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
296 #
297 # The code in logs/storage/validator/logs_validator_traits.cc treats this type
298 # as if it were annotated as ST_LOCATION.
299 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
300 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
301 },
302 ],
303 "eventCount": 42, # Number of times the type of event occurred.
304 # Meaning depends on context (e.g. profile views, contacts, etc.).
305 },
306 },
307 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700308 "nextPageToken": "A String", # A token to retrieve next page of results.
309 # Pass this value in the `ListAnalyticsRequest.page_token` field in the
310 # subsequent call to
311 # ListAnalytics to retrieve the
312 # next page of results.
313 "responseMetadata": { # Common data that is in each API response. # Current response metadata.
314 "debugInfo": { # Debug information about this request. # Debug information about this request.
315 "serverTraceInfo": "A String", # Server-side debug stack trace.
316 "serviceUrl": "A String", # URL of the service that handled this request.
317 "serverInfo": "A String", # Info about the server that serviced this request.
318 },
319 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400320 }</pre>
321</div>
322
323<div class="method">
324 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
325 <pre>Retrieves the next page of results.
326
327Args:
328 previous_request: The request for the previous page. (required)
329 previous_response: The response from the request for the previous page. (required)
330
331Returns:
332 A request object that you can call 'execute()' on to request the next
333 page. Returns None if there are no more items in the collection.
334 </pre>
335</div>
336
337</body></html>