Class: SiteimproveAPIClient::AnalyticsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/siteimprove_api_client/api/analytics_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AnalyticsApi

Returns a new instance of AnalyticsApi.



19
20
21
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#analytics_url_shortener_shortened_urls_get(site_id, opts = {}) ⇒ ShortenedUrlList

Get all account-specific shortened URLs Get all account-specific shortened URLs

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

Returns:



29
30
31
32
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 29

def analytics_url_shortener_shortened_urls_get(site_id, opts = {})
  data, _status_code, _headers = analytics_url_shortener_shortened_urls_get_with_http_info(site_id, opts)
  data
end

#analytics_url_shortener_shortened_urls_get_with_http_info(site_id, opts = {}) ⇒ Array<(ShortenedUrlList, Integer, Hash)>

Get all account-specific shortened URLs Get all account-specific shortened URLs

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

Returns:

  • (Array<(ShortenedUrlList, Integer, Hash)>)

    ShortenedUrlList data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 41

def analytics_url_shortener_shortened_urls_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.analytics_url_shortener_shortened_urls_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.analytics_url_shortener_shortened_urls_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.analytics_url_shortener_shortened_urls_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.analytics_url_shortener_shortened_urls_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.analytics_url_shortener_shortened_urls_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/analytics/url_shortener/shortened_urls'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'site_id'] = site_id
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ShortenedUrlList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.analytics_url_shortener_shortened_urls_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#analytics_url_shortener_shortened_urls_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#settings_analytics_segments_get(opts = {}) ⇒ AnalyticsFilterDetailsList

Get available segments Get the available segments. Segments can be used to segment the data shown by appending the query parameter "filter_id".

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



111
112
113
114
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 111

def settings_analytics_segments_get(opts = {})
  data, _status_code, _headers = settings_analytics_segments_get_with_http_info(opts)
  data
end

#settings_analytics_segments_get_with_http_info(opts = {}) ⇒ Array<(AnalyticsFilterDetailsList, Integer, Hash)>

Get available segments Get the available segments. Segments can be used to segment the data shown by appending the query parameter &quot;filter_id&quot;.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(AnalyticsFilterDetailsList, Integer, Hash)>)

    AnalyticsFilterDetailsList data, response status code and response headers



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 123

def settings_analytics_segments_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.settings_analytics_segments_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.settings_analytics_segments_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.settings_analytics_segments_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.settings_analytics_segments_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/settings/analytics/segments'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AnalyticsFilterDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.settings_analytics_segments_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#settings_analytics_segments_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visit_depth_get(site_id, opts = {}) ⇒ VisitDepthList

Get visit depth from behavior Get the visit depth. Depth relates to the number of page views for each visit. Visits with a high number of page views suggests that the site is encouraging visitors to stay.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



191
192
193
194
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 191

def sites_site_id_analytics_behavior_visit_depth_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visit_depth_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visit_depth_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitDepthList, Integer, Hash)>

Get visit depth from behavior Get the visit depth. Depth relates to the number of page views for each visit. Visits with a high number of page views suggests that the site is encouraging visitors to stay.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitDepthList, Integer, Hash)>)

    VisitDepthList data, response status code and response headers



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 205

def sites_site_id_analytics_behavior_visit_depth_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visit_depth'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitDepthList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visit_depth_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visit_depth_history_get(site_id, opts = {}) ⇒ VisitDepthGraphItemList

Get historical data of visit depth from behavior A series of historical data points showing the average amount of page views. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



278
279
280
281
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 278

def sites_site_id_analytics_behavior_visit_depth_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visit_depth_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visit_depth_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitDepthGraphItemList, Integer, Hash)>

Get historical data of visit depth from behavior A series of historical data points showing the average amount of page views. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitDepthGraphItemList, Integer, Hash)>)

    VisitDepthGraphItemList data, response status code and response headers



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 292

def sites_site_id_analytics_behavior_visit_depth_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visit_depth/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitDepthGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visit_depth_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visit_depth_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visit_length_get(site_id, opts = {}) ⇒ VisitLengthList

Get visit length from behavior Get the length of a visit. Length relates to the duration (in minutes) of each visit.. This data can be used to determine how much your website retains visitor - if the visit length is typically low, you could investigate ways to keep your visitors on your site for longer.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



366
367
368
369
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 366

def sites_site_id_analytics_behavior_visit_length_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visit_length_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visit_length_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitLengthList, Integer, Hash)>

Get visit length from behavior Get the length of a visit. Length relates to the duration (in minutes) of each visit.. This data can be used to determine how much your website retains visitor - if the visit length is typically low, you could investigate ways to keep your visitors on your site for longer.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitLengthList, Integer, Hash)>)

    VisitLengthList data, response status code and response headers



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 381

def sites_site_id_analytics_behavior_visit_length_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visit_length_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visit_length'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitLengthList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visit_length_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visit_length_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visit_length_history_get(site_id, opts = {}) ⇒ VisitLengthGraphItemList

Get historical data of visit length from behavior A series of historical data points showing the average visit length. Length relates to the duration (in minutes) of each visit. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



456
457
458
459
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 456

def sites_site_id_analytics_behavior_visit_length_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visit_length_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visit_length_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitLengthGraphItemList, Integer, Hash)>

Get historical data of visit length from behavior A series of historical data points showing the average visit length. Length relates to the duration (in minutes) of each visit. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitLengthGraphItemList, Integer, Hash)>)

    VisitLengthGraphItemList data, response status code and response headers



471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 471

def sites_site_id_analytics_behavior_visit_length_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visit_length_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visit_length_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visit_length/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitLengthGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visit_length_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visit_length_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visits_by_hour_get(site_id, opts = {}) ⇒ VisitHourList

Get visits by hour of the day from behavior Get the distribution of visits and page views over hours of the day.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



547
548
549
550
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 547

def sites_site_id_analytics_behavior_visits_by_hour_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visits_by_hour_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visits_by_hour_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitHourList, Integer, Hash)>

Get visits by hour of the day from behavior Get the distribution of visits and page views over hours of the day.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitHourList, Integer, Hash)>)

    VisitHourList data, response status code and response headers



563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 563

def sites_site_id_analytics_behavior_visits_by_hour_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visits_by_hour_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_hour_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_hour_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_hour_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_hour_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visits_by_hour'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitHourList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visits_by_hour_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visits_by_hour_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visits_by_monthday_get(site_id, opts = {}) ⇒ VisitMonthDayList

Get visits by day of the month from behavior Get the distribution of visits and page views over day of the month.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



640
641
642
643
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 640

def sites_site_id_analytics_behavior_visits_by_monthday_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visits_by_monthday_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visits_by_monthday_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitMonthDayList, Integer, Hash)>

Get visits by day of the month from behavior Get the distribution of visits and page views over day of the month.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitMonthDayList, Integer, Hash)>)

    VisitMonthDayList data, response status code and response headers



656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 656

def sites_site_id_analytics_behavior_visits_by_monthday_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visits_by_monthday_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_monthday_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_monthday_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_monthday_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_monthday_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visits_by_monthday'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitMonthDayList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visits_by_monthday_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visits_by_monthday_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_behavior_visits_by_weekday_get(site_id, opts = {}) ⇒ VisitWeekDayList

Get visits by weekday from behavior Get the distribution of visits and page views over weekday.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



733
734
735
736
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 733

def sites_site_id_analytics_behavior_visits_by_weekday_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_behavior_visits_by_weekday_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_behavior_visits_by_weekday_get_with_http_info(site_id, opts = {}) ⇒ Array<(VisitWeekDayList, Integer, Hash)>

Get visits by weekday from behavior Get the distribution of visits and page views over weekday.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitWeekDayList, Integer, Hash)>)

    VisitWeekDayList data, response status code and response headers



749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 749

def sites_site_id_analytics_behavior_visits_by_weekday_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_behavior_visits_by_weekday_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_weekday_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_weekday_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_weekday_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_behavior_visits_by_weekday_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/behavior/visits_by_weekday'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitWeekDayList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_behavior_visits_by_weekday_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_behavior_visits_by_weekday_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get(site_id, name_id, source_id, medium_id, opts = {}) ⇒ CampaignSummaryVisitsPageList

Get historical data for the specific campaign combination A series of historical data points showing the amount of visits for the specific campaign combination. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • name_id (Integer)

    Id for specific campaign name

  • source_id (Integer)

    Id for specific campaign source

  • medium_id (Integer)

    Id for specific campaign medium

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



829
830
831
832
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 829

def sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get(site_id, name_id, source_id, medium_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get_with_http_info(site_id, name_id, source_id, medium_id, opts)
  data
end

#sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get_with_http_info(site_id, name_id, source_id, medium_id, opts = {}) ⇒ Array<(CampaignSummaryVisitsPageList, Integer, Hash)>

Get historical data for the specific campaign combination A series of historical data points showing the amount of visits for the specific campaign combination. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • name_id (Integer)

    Id for specific campaign name

  • source_id (Integer)

    Id for specific campaign source

  • medium_id (Integer)

    Id for specific campaign medium

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 848

def sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get_with_http_info(site_id, name_id, source_id, medium_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get"
  end
  # verify the required parameter 'name_id' is set
  if @api_client.config.client_side_validation && name_id.nil?
    fail ArgumentError, "Missing the required parameter 'name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get"
  end
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    fail ArgumentError, "Missing the required parameter 'source_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get"
  end
  # verify the required parameter 'medium_id' is set
  if @api_client.config.client_side_validation && medium_id.nil?
    fail ArgumentError, "Missing the required parameter 'medium_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/combinations/{name_id}/{source_id}/{medium_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'name_id' + '}', CGI.escape(name_id.to_s)).sub('{' + 'source_id' + '}', CGI.escape(source_id.to_s)).sub('{' + 'medium_id' + '}', CGI.escape(medium_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignSummaryVisitsPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get(site_id, name_id, source_id, medium_id, opts = {}) ⇒ CampaignSummaryPagesList

Get the pages visited by the specific campaign combination Lists all the pages visited by the specific combination of campaign name, source and medium.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • name_id (Integer)

    Id for specific campaign name

  • source_id (Integer)

    Id for specific campaign source

  • medium_id (Integer)

    Id for specific campaign medium

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



940
941
942
943
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 940

def sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get(site_id, name_id, source_id, medium_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get_with_http_info(site_id, name_id, source_id, medium_id, opts)
  data
end

#sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get_with_http_info(site_id, name_id, source_id, medium_id, opts = {}) ⇒ Array<(CampaignSummaryPagesList, Integer, Hash)>

Get the pages visited by the specific campaign combination Lists all the pages visited by the specific combination of campaign name, source and medium.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • name_id (Integer)

    Id for specific campaign name

  • source_id (Integer)

    Id for specific campaign source

  • medium_id (Integer)

    Id for specific campaign medium

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignSummaryPagesList, Integer, Hash)>)

    CampaignSummaryPagesList data, response status code and response headers



959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 959

def sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get_with_http_info(site_id, name_id, source_id, medium_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get"
  end
  # verify the required parameter 'name_id' is set
  if @api_client.config.client_side_validation && name_id.nil?
    fail ArgumentError, "Missing the required parameter 'name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get"
  end
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    fail ArgumentError, "Missing the required parameter 'source_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get"
  end
  # verify the required parameter 'medium_id' is set
  if @api_client.config.client_side_validation && medium_id.nil?
    fail ArgumentError, "Missing the required parameter 'medium_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/combinations/{name_id}/{source_id}/{medium_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'name_id' + '}', CGI.escape(name_id.to_s)).sub('{' + 'source_id' + '}', CGI.escape(source_id.to_s)).sub('{' + 'medium_id' + '}', CGI.escape(medium_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignSummaryPagesList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_combinations_name_id_source_id_medium_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_contents_get(site_id, opts = {}) ⇒ CampaignContentList

Get contents from campaigns Content variations in the campaigns used to reach the website. The value in the parameter ‘utm_content` (or another "Content" campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



1048
1049
1050
1051
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1048

def sites_site_id_analytics_campaigns_contents_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_contents_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_contents_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignContentList, Integer, Hash)>

Get contents from campaigns Content variations in the campaigns used to reach the website. The value in the parameter &#x60;utm_content&#x60; (or another &quot;Content&quot; campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CampaignContentList, Integer, Hash)>)

    CampaignContentList data, response status code and response headers



1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1064

def sites_site_id_analytics_campaigns_contents_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_contents_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/contents'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignContentList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_contents_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_contents_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ CampaignContentDetailsList

Get content details from campaigns Shows the ‘name`, `source` and `medium` used in connection with the specified `content`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



1142
1143
1144
1145
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1142

def sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(CampaignContentDetailsList, Integer, Hash)>

Get content details from campaigns Shows the &#x60;name&#x60;, &#x60;source&#x60; and &#x60;medium&#x60; used in connection with the specified &#x60;content&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignContentDetailsList, Integer, Hash)>)

    CampaignContentDetailsList data, response status code and response headers



1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1159

def sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/contents/{parameter_name_id}/{parameter_value_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignContentDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for specific content from campaigns A series of historical data points showing the amount of visits for a specific ‘content` value. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



1245
1246
1247
1248
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1245

def sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for specific content from campaigns A series of historical data points showing the amount of visits for a specific &#x60;content&#x60; value. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1263

def sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/contents/{parameter_name_id}/{parameter_value_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ CampaignPagesList

Get pages related to specific content from campaigns Shows the pages where the specified ‘content` has been used.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



1349
1350
1351
1352
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1349

def sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(CampaignPagesList, Integer, Hash)>

Get pages related to specific content from campaigns Shows the pages where the specified &#x60;content&#x60; has been used.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignPagesList, Integer, Hash)>)

    CampaignPagesList data, response status code and response headers



1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1366

def sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/contents/{parameter_name_id}/{parameter_value_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignPagesList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_contents_parameter_name_id_parameter_value_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_mediums_get(site_id, opts = {}) ⇒ CampaignMediumList

Get mediums from campaigns Medium of the campaigns used to reach the website. The value in the parameter ‘utm_medium` (or another "Medium" campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



1450
1451
1452
1453
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1450

def sites_site_id_analytics_campaigns_mediums_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_mediums_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_mediums_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignMediumList, Integer, Hash)>

Get mediums from campaigns Medium of the campaigns used to reach the website. The value in the parameter &#x60;utm_medium&#x60; (or another &quot;Medium&quot; campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CampaignMediumList, Integer, Hash)>)

    CampaignMediumList data, response status code and response headers



1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1466

def sites_site_id_analytics_campaigns_mediums_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_mediums_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/mediums'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignMediumList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_mediums_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_mediums_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ CampaignMediumDetailsList

Get medium details from campaigns Shows the ‘name` and `source` used in connection with the specified `medium`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



1544
1545
1546
1547
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1544

def sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(CampaignMediumDetailsList, Integer, Hash)>

Get medium details from campaigns Shows the &#x60;name&#x60; and &#x60;source&#x60; used in connection with the specified &#x60;medium&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignMediumDetailsList, Integer, Hash)>)

    CampaignMediumDetailsList data, response status code and response headers



1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1561

def sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/mediums/{parameter_name_id}/{parameter_value_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignMediumDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_mediums_parameter_name_id_parameter_value_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_names_get(site_id, opts = {}) ⇒ CampaignNameList

Get names from campaigns Content variations in the campaigns used to reach the website. The value in the parameter utm_name (or another "Name" campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



1645
1646
1647
1648
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1645

def sites_site_id_analytics_campaigns_names_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_names_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_names_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignNameList, Integer, Hash)>

Get names from campaigns Content variations in the campaigns used to reach the website. The value in the parameter utm_name (or another &quot;Name&quot; campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CampaignNameList, Integer, Hash)>)

    CampaignNameList data, response status code and response headers



1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1661

def sites_site_id_analytics_campaigns_names_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_names_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/names'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignNameList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_names_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_names_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ CampaignNameDetailsList

Get name details from campaigns Shows the ‘medium` and `source` used in connection with the specified `name`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



1739
1740
1741
1742
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1739

def sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(CampaignNameDetailsList, Integer, Hash)>

Get name details from campaigns Shows the &#x60;medium&#x60; and &#x60;source&#x60; used in connection with the specified &#x60;name&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignNameDetailsList, Integer, Hash)>)

    CampaignNameDetailsList data, response status code and response headers



1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1756

def sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/names/{parameter_name_id}/{parameter_value_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignNameDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_names_parameter_name_id_parameter_value_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_pages_get(site_id, opts = {}) ⇒ PageWithCampaignsList

Get pages from campaigns Get pages which have been reached as part of a campaign.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



1841
1842
1843
1844
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1841

def sites_site_id_analytics_campaigns_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(PageWithCampaignsList, Integer, Hash)>

Get pages from campaigns Get pages which have been reached as part of a campaign.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(PageWithCampaignsList, Integer, Hash)>)

    PageWithCampaignsList data, response status code and response headers



1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1858

def sites_site_id_analytics_campaigns_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PageWithCampaignsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_pages_page_id_details_get(site_id, page_id, opts = {}) ⇒ PageWithCampaignsVisitsList

Get details for specific page from campaigns Shows the ‘name`, `source` and `medium` used in connection with the specified page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



1939
1940
1941
1942
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1939

def sites_site_id_analytics_campaigns_pages_page_id_details_get(site_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_pages_page_id_details_get_with_http_info(site_id, page_id, opts)
  data
end

#sites_site_id_analytics_campaigns_pages_page_id_details_get_with_http_info(site_id, page_id, opts = {}) ⇒ Array<(PageWithCampaignsVisitsList, Integer, Hash)>

Get details for specific page from campaigns Shows the &#x60;name&#x60;, &#x60;source&#x60; and &#x60;medium&#x60; used in connection with the specified page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(PageWithCampaignsVisitsList, Integer, Hash)>)

    PageWithCampaignsVisitsList data, response status code and response headers



1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 1954

def sites_site_id_analytics_campaigns_pages_page_id_details_get_with_http_info(site_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/pages/{page_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PageWithCampaignsVisitsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_pages_page_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_pages_page_id_history_get(site_id, page_id, opts = {}) ⇒ PageWithCampaignsVisitsGraphItemList

Get historical data for a specific page in campaigns A series of historical data points showing the amount of visits for a specific ‘page`. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



2032
2033
2034
2035
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2032

def sites_site_id_analytics_campaigns_pages_page_id_history_get(site_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_pages_page_id_history_get_with_http_info(site_id, page_id, opts)
  data
end

#sites_site_id_analytics_campaigns_pages_page_id_history_get_with_http_info(site_id, page_id, opts = {}) ⇒ Array<(PageWithCampaignsVisitsGraphItemList, Integer, Hash)>

Get historical data for a specific page in campaigns A series of historical data points showing the amount of visits for a specific &#x60;page&#x60;. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2047

def sites_site_id_analytics_campaigns_pages_page_id_history_get_with_http_info(site_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PageWithCampaignsVisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_sources_get(site_id, opts = {}) ⇒ CampaignSourceList

Get sources from campaigns Source of the campaigns used to reach the website. The value in the parameter ‘utm_source` (or another "Source" campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



2126
2127
2128
2129
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2126

def sites_site_id_analytics_campaigns_sources_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_sources_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_sources_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignSourceList, Integer, Hash)>

Get sources from campaigns Source of the campaigns used to reach the website. The value in the parameter &#x60;utm_source&#x60; (or another &quot;Source&quot; campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CampaignSourceList, Integer, Hash)>)

    CampaignSourceList data, response status code and response headers



2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2142

def sites_site_id_analytics_campaigns_sources_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_sources_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/sources'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignSourceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_sources_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ CampaignSourceDetailsList

Get source details from campaigns Shows the ‘name` and `medium` used in connection with the specified `source`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



2220
2221
2222
2223
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2220

def sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(CampaignSourceDetailsList, Integer, Hash)>

Get source details from campaigns Shows the &#x60;name&#x60; and &#x60;medium&#x60; used in connection with the specified &#x60;source&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignSourceDetailsList, Integer, Hash)>)

    CampaignSourceDetailsList data, response status code and response headers



2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2237

def sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/sources/{parameter_name_id}/{parameter_value_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignSourceDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_sources_parameter_name_id_parameter_value_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_summary_get(site_id, opts = {}) ⇒ CampaignSummaryList

Get summary of campaigns Lists the campaigns used to reach the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



2322
2323
2324
2325
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2322

def sites_site_id_analytics_campaigns_summary_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_summary_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_summary_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignSummaryList, Integer, Hash)>

Get summary of campaigns Lists the campaigns used to reach the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CampaignSummaryList, Integer, Hash)>)

    CampaignSummaryList data, response status code and response headers



2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2339

def sites_site_id_analytics_campaigns_summary_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_summary_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/summary'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignSummaryList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_summary_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_summary_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_summary_history_get(site_id, opts = {}) ⇒ CampaignsSummaryGraphItemList

Get historical data of all campaigns A series of historical data points showing the amount of visits for all campaigns. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



2418
2419
2420
2421
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2418

def sites_site_id_analytics_campaigns_summary_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_summary_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_summary_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignsSummaryGraphItemList, Integer, Hash)>

Get historical data of all campaigns A series of historical data points showing the amount of visits for all campaigns. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2435

def sites_site_id_analytics_campaigns_summary_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_summary_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_summary_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/summary/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignsSummaryGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_summary_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_summary_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_terms_get(site_id, opts = {}) ⇒ CampaignTermsList

Get terms from campaigns The terms of the campaigns used to reach the website. The value in the parameter ‘utm_term` (or another "Term" campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



2513
2514
2515
2516
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2513

def sites_site_id_analytics_campaigns_terms_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_terms_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_campaigns_terms_get_with_http_info(site_id, opts = {}) ⇒ Array<(CampaignTermsList, Integer, Hash)>

Get terms from campaigns The terms of the campaigns used to reach the website. The value in the parameter &#x60;utm_term&#x60; (or another &quot;Term&quot; campaign parameter that has been added).

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CampaignTermsList, Integer, Hash)>)

    CampaignTermsList data, response status code and response headers



2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2529

def sites_site_id_analytics_campaigns_terms_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_terms_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/terms'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignTermsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_terms_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_terms_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ CampaignTermsDetailsList

Get term details from campaigns Shows the ‘name`, `source` and `medium` used in connection with the specified `term`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



2607
2608
2609
2610
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2607

def sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(CampaignTermsDetailsList, Integer, Hash)>

Get term details from campaigns Shows the &#x60;name&#x60;, &#x60;source&#x60; and &#x60;medium&#x60; used in connection with the specified &#x60;term&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CampaignTermsDetailsList, Integer, Hash)>)

    CampaignTermsDetailsList data, response status code and response headers



2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2624

def sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/campaigns/terms/{parameter_name_id}/{parameter_value_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CampaignTermsDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_campaigns_terms_parameter_name_id_parameter_value_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_all_pages_get(site_id, opts = {}) ⇒ ContentPageList

Get all pages from content Get all pages identified on your site. Note that if your site only has group access then group_id is required, not optional.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



2709
2710
2711
2712
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2709

def sites_site_id_analytics_content_all_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_all_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_all_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(ContentPageList, Integer, Hash)>

Get all pages from content Get all pages identified on your site. Note that if your site only has group access then group_id is required, not optional.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(ContentPageList, Integer, Hash)>)

    ContentPageList data, response status code and response headers



2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2726

def sites_site_id_analytics_content_all_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_all_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_all_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_all_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_all_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_all_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/all_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ContentPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_all_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_all_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_entry_pages_get(site_id, opts = {}) ⇒ EntryPageList

Get entry pages from content An entry page is the first page a visitor sees when they enter the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



2809
2810
2811
2812
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2809

def sites_site_id_analytics_content_entry_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_entry_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_entry_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(EntryPageList, Integer, Hash)>

Get entry pages from content An entry page is the first page a visitor sees when they enter the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(EntryPageList, Integer, Hash)>)

    EntryPageList data, response status code and response headers



2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2826

def sites_site_id_analytics_content_entry_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_entry_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_entry_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_entry_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_entry_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_entry_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/entry_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EntryPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_entry_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_entry_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_exit_pages_get(site_id, opts = {}) ⇒ ExitPageList

Get exit pages from content An exit page is the last page a visitor sees before they leave the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



2909
2910
2911
2912
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2909

def sites_site_id_analytics_content_exit_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_exit_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_exit_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(ExitPageList, Integer, Hash)>

Get exit pages from content An exit page is the last page a visitor sees before they leave the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(ExitPageList, Integer, Hash)>)

    ExitPageList data, response status code and response headers



2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 2926

def sites_site_id_analytics_content_exit_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_exit_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_exit_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_exit_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_exit_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_exit_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/exit_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExitPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_exit_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_exit_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get least popular pages from content Get the least popular pages among the top 1000 pages with the most page views.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



3009
3010
3011
3012
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3009

def sites_site_id_analytics_content_least_popular_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_least_popular_pages_get_with_http_info(site_id, opts)
  data
end

Get least popular pages from content Get the least popular pages among the top 1000 pages with the most page views.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(UnpopularPageList, Integer, Hash)>)

    UnpopularPageList data, response status code and response headers



3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3026

def sites_site_id_analytics_content_least_popular_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_least_popular_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_least_popular_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_least_popular_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_least_popular_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_least_popular_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/least_popular_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'UnpopularPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_least_popular_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_least_popular_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get most popular pages from content Get the most popular pages among the top 1000 pages with the most page views.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



3109
3110
3111
3112
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3109

def sites_site_id_analytics_content_most_popular_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_most_popular_pages_get_with_http_info(site_id, opts)
  data
end

Get most popular pages from content Get the most popular pages among the top 1000 pages with the most page views.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(PopularPageList, Integer, Hash)>)

    PopularPageList data, response status code and response headers



3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3126

def sites_site_id_analytics_content_most_popular_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_most_popular_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_most_popular_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_most_popular_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_most_popular_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_most_popular_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/most_popular_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PopularPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_most_popular_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_most_popular_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_navigation_depth_get(site_id, opts = {}) ⇒ NavigationDepthList

Get navigation depth from content Get the average number of clicks (pages visited) to get to a certain page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



3209
3210
3211
3212
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3209

def sites_site_id_analytics_content_navigation_depth_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_navigation_depth_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_navigation_depth_get_with_http_info(site_id, opts = {}) ⇒ Array<(NavigationDepthList, Integer, Hash)>

Get navigation depth from content Get the average number of clicks (pages visited) to get to a certain page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(NavigationDepthList, Integer, Hash)>)

    NavigationDepthList data, response status code and response headers



3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3226

def sites_site_id_analytics_content_navigation_depth_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_navigation_depth_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_navigation_depth_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_navigation_depth_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_navigation_depth_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_navigation_depth_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/navigation_depth'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'NavigationDepthList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_navigation_depth_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_navigation_depth_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get outbound links from content Get links to external domains, that have been used to leave your site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



3310
3311
3312
3313
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3310

def sites_site_id_analytics_content_outbound_links_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_outbound_links_get_with_http_info(site_id, opts)
  data
end

Get outbound links from content Get links to external domains, that have been used to leave your site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(OutboundLinksList, Integer, Hash)>)

    OutboundLinksList data, response status code and response headers



3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3328

def sites_site_id_analytics_content_outbound_links_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_outbound_links_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/outbound_links'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OutboundLinksList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_outbound_links_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_outbound_links_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get historical data for specific outbound link from content A series of historical data points showing the amount of visits for a specific outbound link. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • outbound_link_id (Integer)

    Id for specific outbound link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



3412
3413
3414
3415
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3412

def sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get(site_id, outbound_link_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get_with_http_info(site_id, outbound_link_id, opts)
  data
end

Get historical data for specific outbound link from content A series of historical data points showing the amount of visits for a specific outbound link. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • outbound_link_id (Integer)

    Id for specific outbound link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OutboundLinksGraphSliceList, Integer, Hash)>)

    OutboundLinksGraphSliceList data, response status code and response headers



3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3429

def sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get_with_http_info(site_id, outbound_link_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get"
  end
  # verify the required parameter 'outbound_link_id' is set
  if @api_client.config.client_side_validation && outbound_link_id.nil?
    fail ArgumentError, "Missing the required parameter 'outbound_link_id' when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/outbound_links/{outbound_link_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'outbound_link_id' + '}', CGI.escape(outbound_link_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OutboundLinksGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_outbound_links_outbound_link_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get pages for specific outbound link from content Get the pages where the specified outbound link has been used

Parameters:

  • site_id (Integer)

    Id for specific site.

  • outbound_link_id (Integer)

    Id for specific outbound link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



3511
3512
3513
3514
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3511

def sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get(site_id, outbound_link_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get_with_http_info(site_id, outbound_link_id, opts)
  data
end

Get pages for specific outbound link from content Get the pages where the specified outbound link has been used

Parameters:

  • site_id (Integer)

    Id for specific site.

  • outbound_link_id (Integer)

    Id for specific outbound link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OutboundLinksPageList, Integer, Hash)>)

    OutboundLinksPageList data, response status code and response headers



3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3528

def sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get_with_http_info(site_id, outbound_link_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get"
  end
  # verify the required parameter 'outbound_link_id' is set
  if @api_client.config.client_side_validation && outbound_link_id.nil?
    fail ArgumentError, "Missing the required parameter 'outbound_link_id' when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/outbound_links/{outbound_link_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'outbound_link_id' + '}', CGI.escape(outbound_link_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OutboundLinksPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_outbound_links_outbound_link_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_page_load_time_get(site_id, opts = {}) ⇒ PageLoadTimeDetailsList

Get page load time from content Get the average amount of time (in seconds) it takes a page to load.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



3610
3611
3612
3613
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3610

def sites_site_id_analytics_content_page_load_time_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_page_load_time_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_page_load_time_get_with_http_info(site_id, opts = {}) ⇒ Array<(PageLoadTimeDetailsList, Integer, Hash)>

Get page load time from content Get the average amount of time (in seconds) it takes a page to load.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(PageLoadTimeDetailsList, Integer, Hash)>)

    PageLoadTimeDetailsList data, response status code and response headers



3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3627

def sites_site_id_analytics_content_page_load_time_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_page_load_time_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_page_load_time_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_page_load_time_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_page_load_time_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_page_load_time_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/page_load_time'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PageLoadTimeDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_page_load_time_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_page_load_time_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_pages_without_visits_get(site_id, opts = {}) ⇒ PagesWithNoVisitsList

Get pages without visits from content Get the pages that have had no visits in the selected time period. Only pages that meet ALL of the criteria listed below will be included: * The page must have the Siteimprove Analytics script. * The page must have Analytics/Quality Assurance integration - i.e. the page must be found in both QA and Analytics and have a match established between them. * The page must have been found in the latest Quality Assurance crawl. * The page must have had no visits in the selected time period with any chosen filter and group. * If the page registered in Quality Assurance has multiple Analytics link matches (in case of a parameter exclusion, for example), the page will only be included if none of these links have had any visits. These criteria make sure that pages included in the list with relative certainty have NOT had any visits during the selected time period.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



3710
3711
3712
3713
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3710

def sites_site_id_analytics_content_pages_without_visits_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_pages_without_visits_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_pages_without_visits_get_with_http_info(site_id, opts = {}) ⇒ Array<(PagesWithNoVisitsList, Integer, Hash)>

Get pages without visits from content Get the pages that have had no visits in the selected time period. Only pages that meet ALL of the criteria listed below will be included: * The page must have the Siteimprove Analytics script. * The page must have Analytics/Quality Assurance integration - i.e. the page must be found in both QA and Analytics and have a match established between them. * The page must have been found in the latest Quality Assurance crawl. * The page must have had no visits in the selected time period with any chosen filter and group. * If the page registered in Quality Assurance has multiple Analytics link matches (in case of a parameter exclusion, for example), the page will only be included if none of these links have had any visits. These criteria make sure that pages included in the list with relative certainty have NOT had any visits during the selected time period.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(PagesWithNoVisitsList, Integer, Hash)>)

    PagesWithNoVisitsList data, response status code and response headers



3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3727

def sites_site_id_analytics_content_pages_without_visits_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_pages_without_visits_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_pages_without_visits_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_pages_without_visits_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_pages_without_visits_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_pages_without_visits_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/pages_without_visits'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PagesWithNoVisitsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_pages_without_visits_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_pages_without_visits_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_parameters_get(site_id, opts = {}) ⇒ ParameterNameList

Get parameters from content Visits and page view statistics for all parameters that have been setup.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Filter the parameter names (applied as [query]).

Returns:



3810
3811
3812
3813
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3810

def sites_site_id_analytics_content_parameters_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_parameters_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_content_parameters_get_with_http_info(site_id, opts = {}) ⇒ Array<(ParameterNameList, Integer, Hash)>

Get parameters from content Visits and page view statistics for all parameters that have been setup.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Filter the parameter names (applied as [query]).

Returns:

  • (Array<(ParameterNameList, Integer, Hash)>)

    ParameterNameList data, response status code and response headers



3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3827

def sites_site_id_analytics_content_parameters_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_parameters_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/parameters'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ParameterNameList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_parameters_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_parameters_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_parameters_parameter_name_id_history_get(site_id, parameter_name_id, opts = {}) ⇒ ParameterNameValueVisitsGraphSliceList

Get historical data for specific parameter from content A series of historical data points showing the amount of visits for a specific parameter. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



3906
3907
3908
3909
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3906

def sites_site_id_analytics_content_parameters_parameter_name_id_history_get(site_id, parameter_name_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_parameters_parameter_name_id_history_get_with_http_info(site_id, parameter_name_id, opts)
  data
end

#sites_site_id_analytics_content_parameters_parameter_name_id_history_get_with_http_info(site_id, parameter_name_id, opts = {}) ⇒ Array<(ParameterNameValueVisitsGraphSliceList, Integer, Hash)>

Get historical data for specific parameter from content A series of historical data points showing the amount of visits for a specific parameter. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 3923

def sites_site_id_analytics_content_parameters_parameter_name_id_history_get_with_http_info(site_id, parameter_name_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/parameters/{parameter_name_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ParameterNameValueVisitsGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_parameters_parameter_name_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_parameters_parameter_name_id_pages_get(site_id, parameter_name_id, opts = {}) ⇒ ParameterPageList

Get pages for specific parameter from content Get the pages where the specified parameter have been collected.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



4006
4007
4008
4009
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4006

def sites_site_id_analytics_content_parameters_parameter_name_id_pages_get(site_id, parameter_name_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_parameters_parameter_name_id_pages_get_with_http_info(site_id, parameter_name_id, opts)
  data
end

#sites_site_id_analytics_content_parameters_parameter_name_id_pages_get_with_http_info(site_id, parameter_name_id, opts = {}) ⇒ Array<(ParameterPageList, Integer, Hash)>

Get pages for specific parameter from content Get the pages where the specified parameter have been collected.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(ParameterPageList, Integer, Hash)>)

    ParameterPageList data, response status code and response headers



4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4024

def sites_site_id_analytics_content_parameters_parameter_name_id_pages_get_with_http_info(site_id, parameter_name_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/parameters/{parameter_name_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ParameterPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_parameters_parameter_name_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_parameters_parameter_name_id_values_get(site_id, parameter_name_id, opts = {}) ⇒ ParameterValueList

Get values for specific parameter from content Get the collected values for the specified parameter.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Filter the values (applied as [query]).

Returns:



4112
4113
4114
4115
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4112

def sites_site_id_analytics_content_parameters_parameter_name_id_values_get(site_id, parameter_name_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_parameters_parameter_name_id_values_get_with_http_info(site_id, parameter_name_id, opts)
  data
end

#sites_site_id_analytics_content_parameters_parameter_name_id_values_get_with_http_info(site_id, parameter_name_id, opts = {}) ⇒ Array<(ParameterValueList, Integer, Hash)>

Get values for specific parameter from content Get the collected values for the specified parameter.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Filter the values (applied as [query]).

Returns:

  • (Array<(ParameterValueList, Integer, Hash)>)

    ParameterValueList data, response status code and response headers



4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4130

def sites_site_id_analytics_content_parameters_parameter_name_id_values_get_with_http_info(site_id, parameter_name_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/parameters/{parameter_name_id}/values'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ParameterValueList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_parameters_parameter_name_id_values_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ ParameterNameValueVisitsGraphSliceList

Get historical data for specific parameter value from campaigns A series of historical data points showing the amount of visits for a specific parameter value. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



4214
4215
4216
4217
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4214

def sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(ParameterNameValueVisitsGraphSliceList, Integer, Hash)>

Get historical data for specific parameter value from campaigns A series of historical data points showing the amount of visits for a specific parameter value. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4232

def sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/parameters/{parameter_name_id}/values/{parameter_value_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ParameterNameValueVisitsGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ ParameterPageList

Get pages for specific parameter value from content Get the pages where the specified parameter value have been collected.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



4320
4321
4322
4323
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4320

def sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get(site_id, parameter_name_id, parameter_value_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts)
  data
end

#sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {}) ⇒ Array<(ParameterPageList, Integer, Hash)>

Get pages for specific parameter value from content Get the pages where the specified parameter value have been collected.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • parameter_name_id (Integer)

    Id for specific parameter name.

  • parameter_value_id (Integer)

    Id for specific parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(ParameterPageList, Integer, Hash)>)

    ParameterPageList data, response status code and response headers



4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4339

def sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get_with_http_info(site_id, parameter_name_id, parameter_value_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get"
  end
  # verify the required parameter 'parameter_name_id' is set
  if @api_client.config.client_side_validation && parameter_name_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_name_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get"
  end
  # verify the required parameter 'parameter_value_id' is set
  if @api_client.config.client_side_validation && parameter_value_id.nil?
    fail ArgumentError, "Missing the required parameter 'parameter_value_id' when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/content/parameters/{parameter_name_id}/values/{parameter_value_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'parameter_name_id' + '}', CGI.escape(parameter_name_id.to_s)).sub('{' + 'parameter_value_id' + '}', CGI.escape(parameter_value_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ParameterPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_content_parameters_parameter_name_id_values_parameter_value_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_entries_exits_bounce_rates_get(site_id, opts = {}) ⇒ BounceRatePageList

Get bounce rates from entries and exits List of pages with bounces and bounce rate.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



4430
4431
4432
4433
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4430

def sites_site_id_analytics_entries_exits_bounce_rates_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_entries_exits_bounce_rates_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_entries_exits_bounce_rates_get_with_http_info(site_id, opts = {}) ⇒ Array<(BounceRatePageList, Integer, Hash)>

Get bounce rates from entries and exits List of pages with bounces and bounce rate.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(BounceRatePageList, Integer, Hash)>)

    BounceRatePageList data, response status code and response headers



4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4447

def sites_site_id_analytics_entries_exits_bounce_rates_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_entries_exits_bounce_rates_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_entries_exits_bounce_rates_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_bounce_rates_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_bounce_rates_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_bounce_rates_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/entries_exits/bounce_rates'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BounceRatePageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_entries_exits_bounce_rates_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_entries_exits_bounce_rates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_entries_exits_entry_exit_rates_get(site_id, opts = {}) ⇒ EntryExitRatePageList

Get entry and exit rates from entries and exits List the amount of entries and exits registered for your pages.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



4530
4531
4532
4533
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4530

def sites_site_id_analytics_entries_exits_entry_exit_rates_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_entries_exits_entry_exit_rates_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_entries_exits_entry_exit_rates_get_with_http_info(site_id, opts = {}) ⇒ Array<(EntryExitRatePageList, Integer, Hash)>

Get entry and exit rates from entries and exits List the amount of entries and exits registered for your pages.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(EntryExitRatePageList, Integer, Hash)>)

    EntryExitRatePageList data, response status code and response headers



4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4547

def sites_site_id_analytics_entries_exits_entry_exit_rates_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/entries_exits/entry_exit_rates'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EntryExitRatePageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_entries_exits_entry_exit_rates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get(site_id, page_id, opts = {}) ⇒ LastOutboundLinkPageList

Get last outbound links for specific exit page from entries and exits The last outbound links and their amount of clicks for a specific exit page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



4631
4632
4633
4634
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4631

def sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get(site_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get_with_http_info(site_id, page_id, opts)
  data
end

#sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get_with_http_info(site_id, page_id, opts = {}) ⇒ Array<(LastOutboundLinkPageList, Integer, Hash)>

Get last outbound links for specific exit page from entries and exits The last outbound links and their amount of clicks for a specific exit page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(LastOutboundLinkPageList, Integer, Hash)>)

    LastOutboundLinkPageList data, response status code and response headers



4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4649

def sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get_with_http_info(site_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/entries_exits/entry_exit_rates/{page_id}/last_outbound_links'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LastOutboundLinkPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_entries_exits_entry_exit_rates_page_id_last_outbound_links_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_actions_get(site_id, opts = {}) ⇒ EventActionList

Get actions from event tracking Get all the event actions performed on your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



4735
4736
4737
4738
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4735

def sites_site_id_analytics_event_tracking_actions_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_actions_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_actions_get_with_http_info(site_id, opts = {}) ⇒ Array<(EventActionList, Integer, Hash)>

Get actions from event tracking Get all the event actions performed on your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(EventActionList, Integer, Hash)>)

    EventActionList data, response status code and response headers



4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4751

def sites_site_id_analytics_event_tracking_actions_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_actions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_actions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_actions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_actions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_actions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/actions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventActionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_actions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_actions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get(site_id, category_id, action_id, opts = {}) ⇒ CategoryActionLabelList

Get labels for specific pair of category and action from event tracking Get the ‘labels` that have been used in connection with the specified `category` and `action`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • category_id (Integer)

    Id of a specific category.

  • action_id (Integer)

    Id of a specific action.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



4829
4830
4831
4832
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4829

def sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get(site_id, category_id, action_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get_with_http_info(site_id, category_id, action_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get_with_http_info(site_id, category_id, action_id, opts = {}) ⇒ Array<(CategoryActionLabelList, Integer, Hash)>

Get labels for specific pair of category and action from event tracking Get the &#x60;labels&#x60; that have been used in connection with the specified &#x60;category&#x60; and &#x60;action&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • category_id (Integer)

    Id of a specific category.

  • action_id (Integer)

    Id of a specific action.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CategoryActionLabelList, Integer, Hash)>)

    CategoryActionLabelList data, response status code and response headers



4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4846

def sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get_with_http_info(site_id, category_id, action_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get"
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get"
  end
  # verify the required parameter 'action_id' is set
  if @api_client.config.client_side_validation && action_id.nil?
    fail ArgumentError, "Missing the required parameter 'action_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/categories/{category_id}/actions/{action_id}/labels'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s)).sub('{' + 'action_id' + '}', CGI.escape(action_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CategoryActionLabelList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_categories_category_id_actions_action_id_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_categories_category_id_actions_get(site_id, category_id, opts = {}) ⇒ CategoryActionList

Get actions for specific category from event tracking Get the ‘actions` that have been used in connection with a specific `category`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • category_id (Integer)

    Id of a specific category.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



4930
4931
4932
4933
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4930

def sites_site_id_analytics_event_tracking_categories_category_id_actions_get(site_id, category_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_categories_category_id_actions_get_with_http_info(site_id, category_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_categories_category_id_actions_get_with_http_info(site_id, category_id, opts = {}) ⇒ Array<(CategoryActionList, Integer, Hash)>

Get actions for specific category from event tracking Get the &#x60;actions&#x60; that have been used in connection with a specific &#x60;category&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • category_id (Integer)

    Id of a specific category.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(CategoryActionList, Integer, Hash)>)

    CategoryActionList data, response status code and response headers



4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 4946

def sites_site_id_analytics_event_tracking_categories_category_id_actions_get_with_http_info(site_id, category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get"
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/categories/{category_id}/actions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CategoryActionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_categories_category_id_actions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_categories_category_id_actions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_categories_get(site_id, opts = {}) ⇒ EventCategoryList

Get categories from event tracking Get all the event categories. Categories are used to group events in logical clusters, such as videos, contact, forms etc.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



5026
5027
5028
5029
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5026

def sites_site_id_analytics_event_tracking_categories_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_categories_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_categories_get_with_http_info(site_id, opts = {}) ⇒ Array<(EventCategoryList, Integer, Hash)>

Get categories from event tracking Get all the event categories. Categories are used to group events in logical clusters, such as videos, contact, forms etc.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(EventCategoryList, Integer, Hash)>)

    EventCategoryList data, response status code and response headers



5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5042

def sites_site_id_analytics_event_tracking_categories_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_categories_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_categories_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/categories'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventCategoryList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_categories_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_categories_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_events_get(site_id, opts = {}) ⇒ EventList

Get events from event tracking Get the events that have been triggered within the chosen period.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



5120
5121
5122
5123
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5120

def sites_site_id_analytics_event_tracking_events_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_events_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_events_get_with_http_info(site_id, opts = {}) ⇒ Array<(EventList, Integer, Hash)>

Get events from event tracking Get the events that have been triggered within the chosen period.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(EventList, Integer, Hash)>)

    EventList data, response status code and response headers



5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5137

def sites_site_id_analytics_event_tracking_events_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_events_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/events'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_events_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_events_history_get(site_id, opts = {}) ⇒ EventGraphItemList

Get historical data for events from event tracking A series of historical data points showing the amount of events, visits and pages. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



5216
5217
5218
5219
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5216

def sites_site_id_analytics_event_tracking_events_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_events_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_events_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(EventGraphItemList, Integer, Hash)>

Get historical data for events from event tracking A series of historical data points showing the amount of events, visits and pages. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(EventGraphItemList, Integer, Hash)>)

    EventGraphItemList data, response status code and response headers



5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5233

def sites_site_id_analytics_event_tracking_events_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_events_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/events/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_events_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_events_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_events_pages_get(site_id, opts = {}) ⇒ FilteredEventPageList

Get pages for specific event from event tracking Get the pages where the specified event have been triggered.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :action_id (Integer)

    Id of a specific action.

  • :category_id (Integer)

    Id of a specific category.

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :label_id (Integer)

    Id of a specific label.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



5314
5315
5316
5317
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5314

def sites_site_id_analytics_event_tracking_events_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_events_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_events_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(FilteredEventPageList, Integer, Hash)>

Get pages for specific event from event tracking Get the pages where the specified event have been triggered.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :action_id (Integer)

    Id of a specific action.

  • :category_id (Integer)

    Id of a specific category.

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :label_id (Integer)

    Id of a specific label.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(FilteredEventPageList, Integer, Hash)>)

    FilteredEventPageList data, response status code and response headers



5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5333

def sites_site_id_analytics_event_tracking_events_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_events_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_events_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/events/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'action_id'] = opts[:'action_id'] if !opts[:'action_id'].nil?
  query_params[:'category_id'] = opts[:'category_id'] if !opts[:'category_id'].nil?
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'label_id'] = opts[:'label_id'] if !opts[:'label_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FilteredEventPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_events_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_events_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_labels_get(site_id, opts = {}) ⇒ EventLabelList

Get labels from event tracking Get all the event labels. Labels are used to see specifics about an event.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



5413
5414
5415
5416
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5413

def sites_site_id_analytics_event_tracking_labels_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_labels_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_labels_get_with_http_info(site_id, opts = {}) ⇒ Array<(EventLabelList, Integer, Hash)>

Get labels from event tracking Get all the event labels. Labels are used to see specifics about an event.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(EventLabelList, Integer, Hash)>)

    EventLabelList data, response status code and response headers



5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5429

def sites_site_id_analytics_event_tracking_labels_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_labels_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/labels'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventLabelList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_labels_label_id_events_get(site_id, label_id, opts = {}) ⇒ LabelActionList

Get label details from event tracking Get the ‘action` and `category` pairs that have been used in connection with the specified `label`.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • label_id (Integer)

    Id of a specific label.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



5506
5507
5508
5509
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5506

def sites_site_id_analytics_event_tracking_labels_label_id_events_get(site_id, label_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_labels_label_id_events_get_with_http_info(site_id, label_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_labels_label_id_events_get_with_http_info(site_id, label_id, opts = {}) ⇒ Array<(LabelActionList, Integer, Hash)>

Get label details from event tracking Get the &#x60;action&#x60; and &#x60;category&#x60; pairs that have been used in connection with the specified &#x60;label&#x60;.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • label_id (Integer)

    Id of a specific label.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(LabelActionList, Integer, Hash)>)

    LabelActionList data, response status code and response headers



5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5522

def sites_site_id_analytics_event_tracking_labels_label_id_events_get_with_http_info(site_id, label_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get"
  end
  # verify the required parameter 'label_id' is set
  if @api_client.config.client_side_validation && label_id.nil?
    fail ArgumentError, "Missing the required parameter 'label_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/labels/{label_id}/events'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'label_id' + '}', CGI.escape(label_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelActionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_labels_label_id_events_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_labels_label_id_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_pages_get(site_id, opts = {}) ⇒ EventPageList

Get pages from event tracking Get all the pages where an event have been triggered.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



5603
5604
5605
5606
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5603

def sites_site_id_analytics_event_tracking_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(EventPageList, Integer, Hash)>

Get pages from event tracking Get all the pages where an event have been triggered.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(EventPageList, Integer, Hash)>)

    EventPageList data, response status code and response headers



5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5620

def sites_site_id_analytics_event_tracking_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_pages_page_id_events_get(site_id, page_id, opts = {}) ⇒ PageEventList

Get event details for specific page from event tracking Get the event details for a specific page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



5701
5702
5703
5704
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5701

def sites_site_id_analytics_event_tracking_pages_page_id_events_get(site_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_pages_page_id_events_get_with_http_info(site_id, page_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_pages_page_id_events_get_with_http_info(site_id, page_id, opts = {}) ⇒ Array<(PageEventList, Integer, Hash)>

Get event details for specific page from event tracking Get the event details for a specific page.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(PageEventList, Integer, Hash)>)

    PageEventList data, response status code and response headers



5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5716

def sites_site_id_analytics_event_tracking_pages_page_id_events_get_with_http_info(site_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/pages/{page_id}/events'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PageEventList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_events_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_pages_page_id_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_event_tracking_pages_page_id_history_get(site_id, page_id, opts = {}) ⇒ EventGraphSliceList

Get historical data for specific page from event tracking A series of historical data points showing the amount of events for the specified page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



5795
5796
5797
5798
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5795

def sites_site_id_analytics_event_tracking_pages_page_id_history_get(site_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_event_tracking_pages_page_id_history_get_with_http_info(site_id, page_id, opts)
  data
end

#sites_site_id_analytics_event_tracking_pages_page_id_history_get_with_http_info(site_id, page_id, opts = {}) ⇒ Array<(EventGraphSliceList, Integer, Hash)>

Get historical data for specific page from event tracking A series of historical data points showing the amount of events for the specified page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(EventGraphSliceList, Integer, Hash)>)

    EventGraphSliceList data, response status code and response headers



5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5811

def sites_site_id_analytics_event_tracking_pages_page_id_history_get_with_http_info(site_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/event_tracking/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EventGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_event_tracking_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_event_tracking_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_internal_searches_get(site_id, opts = {}) ⇒ InternalSearchList

Get internal searches The the search terms that your users have entered into your search solution.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_results (String)

    Filter to see either all search terms or only those that did or did not find a result. (default to ‘all’)

Returns:



5893
5894
5895
5896
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5893

def sites_site_id_analytics_internal_searches_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_internal_searches_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_internal_searches_get_with_http_info(site_id, opts = {}) ⇒ Array<(InternalSearchList, Integer, Hash)>

Get internal searches The the search terms that your users have entered into your search solution.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_results (String)

    Filter to see either all search terms or only those that did or did not find a result. (default to ‘all’)

Returns:

  • (Array<(InternalSearchList, Integer, Hash)>)

    InternalSearchList data, response status code and response headers



5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5911

def sites_site_id_analytics_internal_searches_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_internal_searches_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_internal_searches_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_get, must be greater than or equal to 1.'
  end

  allowable_values = ["all", "with_results", "without_results"]
  if @api_client.config.client_side_validation && opts[:'search_results'] && !allowable_values.include?(opts[:'search_results'])
    fail ArgumentError, "invalid value for \"search_results\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/internal_searches'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_results'] = opts[:'search_results'] if !opts[:'search_results'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'InternalSearchList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_internal_searches_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_internal_searches_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_internal_searches_history_get(site_id, opts = {}) ⇒ InternalSearchGraphItemList

Get historical data from internal searches A series of historical data points showing the amount of visits, searches and exists. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_results (String)

    Filter to see either all search terms or only those that did or did not find a result. (default to ‘all’)

Returns:



5996
5997
5998
5999
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 5996

def sites_site_id_analytics_internal_searches_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_internal_searches_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_internal_searches_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(InternalSearchGraphItemList, Integer, Hash)>

Get historical data from internal searches A series of historical data points showing the amount of visits, searches and exists. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_results (String)

    Filter to see either all search terms or only those that did or did not find a result. (default to ‘all’)

Returns:

  • (Array<(InternalSearchGraphItemList, Integer, Hash)>)

    InternalSearchGraphItemList data, response status code and response headers



6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6014

def sites_site_id_analytics_internal_searches_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_internal_searches_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_internal_searches_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_history_get, must be greater than or equal to 1.'
  end

  allowable_values = ["all", "with_results", "without_results"]
  if @api_client.config.client_side_validation && opts[:'search_results'] && !allowable_values.include?(opts[:'search_results'])
    fail ArgumentError, "invalid value for \"search_results\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/internal_searches/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_results'] = opts[:'search_results'] if !opts[:'search_results'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'InternalSearchGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_internal_searches_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_internal_searches_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get(site_id, search_term_id, opts = {}) ⇒ InternalSearchPageActionList

Get actions for specific search term from internal searches Get the actions performed by the user after searching for the specified search term.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6098
6099
6100
6101
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6098

def sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get(site_id, search_term_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get_with_http_info(site_id, search_term_id, opts)
  data
end

#sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get_with_http_info(site_id, search_term_id, opts = {}) ⇒ Array<(InternalSearchPageActionList, Integer, Hash)>

Get actions for specific search term from internal searches Get the actions performed by the user after searching for the specified search term.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6115

def sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get_with_http_info(site_id, search_term_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get"
  end
  # verify the required parameter 'search_term_id' is set
  if @api_client.config.client_side_validation && search_term_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_term_id' when calling AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/internal_searches/search_terms/{search_term_id}/actions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_term_id' + '}', CGI.escape(search_term_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'InternalSearchPageActionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_internal_searches_search_terms_search_term_id_actions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_keymetrics_categories_get(site_id, opts = {}) ⇒ KeyMetricsCategoryList

Get categories The available categories for use with Key Metrics.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



6195
6196
6197
6198
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6195

def sites_site_id_analytics_keymetrics_categories_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_keymetrics_categories_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_keymetrics_categories_get_with_http_info(site_id, opts = {}) ⇒ Array<(KeyMetricsCategoryList, Integer, Hash)>

Get categories The available categories for use with Key Metrics.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(KeyMetricsCategoryList, Integer, Hash)>)

    KeyMetricsCategoryList data, response status code and response headers



6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6210

def sites_site_id_analytics_keymetrics_categories_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_keymetrics_categories_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_keymetrics_categories_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_categories_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_categories_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_categories_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/keymetrics/categories'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'KeyMetricsCategoryList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_keymetrics_categories_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_keymetrics_categories_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_keymetrics_kpis_get(site_id, opts = {}) ⇒ KeyMetricsKpiOverviewList

Get Key Performance Indicators The Key Performance Indicators for use with Key Metrics.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



6285
6286
6287
6288
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6285

def sites_site_id_analytics_keymetrics_kpis_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_keymetrics_kpis_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_keymetrics_kpis_get_with_http_info(site_id, opts = {}) ⇒ Array<(KeyMetricsKpiOverviewList, Integer, Hash)>

Get Key Performance Indicators The Key Performance Indicators for use with Key Metrics.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(KeyMetricsKpiOverviewList, Integer, Hash)>)

    KeyMetricsKpiOverviewList data, response status code and response headers



6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6300

def sites_site_id_analytics_keymetrics_kpis_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_keymetrics_kpis_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_keymetrics_kpis_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_kpis_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_kpis_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_kpis_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/keymetrics/kpis'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'KeyMetricsKpiOverviewList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_keymetrics_kpis_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_keymetrics_kpis_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_keymetrics_metrics_get(site_id, opts = {}) ⇒ KeyMetricsMetricList

Get Key Metrics The Key Metrics.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



6375
6376
6377
6378
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6375

def sites_site_id_analytics_keymetrics_metrics_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_keymetrics_metrics_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_keymetrics_metrics_get_with_http_info(site_id, opts = {}) ⇒ Array<(KeyMetricsMetricList, Integer, Hash)>

Get Key Metrics The Key Metrics.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(KeyMetricsMetricList, Integer, Hash)>)

    KeyMetricsMetricList data, response status code and response headers



6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6390

def sites_site_id_analytics_keymetrics_metrics_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_keymetrics_metrics_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_keymetrics_metrics_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_metrics_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_metrics_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_keymetrics_metrics_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/keymetrics/metrics'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'KeyMetricsMetricList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_keymetrics_metrics_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_keymetrics_metrics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_overview_groups_get(site_id, opts = {}) ⇒ GroupDetailsList

Get analytics groups Get the groups available. Groups are used to display statistics for specific sections of the website or a collection of pages.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



6465
6466
6467
6468
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6465

def sites_site_id_analytics_overview_groups_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_overview_groups_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_overview_groups_get_with_http_info(site_id, opts = {}) ⇒ Array<(GroupDetailsList, Integer, Hash)>

Get analytics groups Get the groups available. Groups are used to display statistics for specific sections of the website or a collection of pages.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(GroupDetailsList, Integer, Hash)>)

    GroupDetailsList data, response status code and response headers



6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6480

def sites_site_id_analytics_overview_groups_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_overview_groups_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_overview_groups_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_overview_groups_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_groups_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_groups_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/overview/groups'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GroupDetailsList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_overview_groups_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_overview_groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_overview_history_get(site_id, opts = {}) ⇒ FullOverviewItemList

Get historical data from overview A series of historical data points showing the most common statistics for your site. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6556
6557
6558
6559
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6556

def sites_site_id_analytics_overview_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_overview_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_overview_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(FullOverviewItemList, Integer, Hash)>

Get historical data from overview A series of historical data points showing the most common statistics for your site. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(FullOverviewItemList, Integer, Hash)>)

    FullOverviewItemList data, response status code and response headers



6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6572

def sites_site_id_analytics_overview_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_overview_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_overview_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_overview_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/overview/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FullOverviewItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_overview_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_overview_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_overview_online_visitors_get(site_id, opts = {}) ⇒ OnlineVisitorList

Get online visitors from overview Get the current online visitors. Will always use the ‘Now` period.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6648
6649
6650
6651
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6648

def sites_site_id_analytics_overview_online_visitors_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_overview_online_visitors_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_overview_online_visitors_get_with_http_info(site_id, opts = {}) ⇒ Array<(OnlineVisitorList, Integer, Hash)>

Get online visitors from overview Get the current online visitors. Will always use the &#x60;Now&#x60; period.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OnlineVisitorList, Integer, Hash)>)

    OnlineVisitorList data, response status code and response headers



6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6663

def sites_site_id_analytics_overview_online_visitors_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_overview_online_visitors_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/overview/online_visitors'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OnlineVisitorList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_overview_online_visitors_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_overview_online_visitors_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_overview_online_visitors_session_id_details_get(site_id, session_id, opts = {}) ⇒ OnlineVisitorDetails

Get details for online visitor from overview Get a detailed view of the specified online visitor.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • session_id (Integer)

    Id for specific session.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6736
6737
6738
6739
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6736

def sites_site_id_analytics_overview_online_visitors_session_id_details_get(site_id, session_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_overview_online_visitors_session_id_details_get_with_http_info(site_id, session_id, opts)
  data
end

#sites_site_id_analytics_overview_online_visitors_session_id_details_get_with_http_info(site_id, session_id, opts = {}) ⇒ Array<(OnlineVisitorDetails, Integer, Hash)>

Get details for online visitor from overview Get a detailed view of the specified online visitor.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • session_id (Integer)

    Id for specific session.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OnlineVisitorDetails, Integer, Hash)>)

    OnlineVisitorDetails data, response status code and response headers



6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6749

def sites_site_id_analytics_overview_online_visitors_session_id_details_get_with_http_info(site_id, session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_details_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_details_get"
  end
  # verify the required parameter 'session_id' is set
  if @api_client.config.client_side_validation && session_id.nil?
    fail ArgumentError, "Missing the required parameter 'session_id' when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_details_get"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/overview/online_visitors/{session_id}/details'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OnlineVisitorDetails'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_details_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_overview_online_visitors_session_id_details_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_overview_online_visitors_session_id_pages_get(site_id, session_id, opts = {}) ⇒ OnlineVisitorPageViewList

Get pages for specific online visitor from overview Get the pages visited by the specified online visitor.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • session_id (Integer)

    Id for specific session.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6813
6814
6815
6816
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6813

def sites_site_id_analytics_overview_online_visitors_session_id_pages_get(site_id, session_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_overview_online_visitors_session_id_pages_get_with_http_info(site_id, session_id, opts)
  data
end

#sites_site_id_analytics_overview_online_visitors_session_id_pages_get_with_http_info(site_id, session_id, opts = {}) ⇒ Array<(OnlineVisitorPageViewList, Integer, Hash)>

Get pages for specific online visitor from overview Get the pages visited by the specified online visitor.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • session_id (Integer)

    Id for specific session.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OnlineVisitorPageViewList, Integer, Hash)>)

    OnlineVisitorPageViewList data, response status code and response headers



6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6828

def sites_site_id_analytics_overview_online_visitors_session_id_pages_get_with_http_info(site_id, session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get"
  end
  # verify the required parameter 'session_id' is set
  if @api_client.config.client_side_validation && session_id.nil?
    fail ArgumentError, "Missing the required parameter 'session_id' when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/overview/online_visitors/{session_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OnlineVisitorPageViewList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_overview_online_visitors_session_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_overview_online_visitors_session_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_overview_summary_get(site_id, opts = {}) ⇒ OverviewStat

Get summary for analytics Get a summary of the most common statistics for your site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page_id (Integer)

    Id for specific page.

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



6905
6906
6907
6908
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6905

def sites_site_id_analytics_overview_summary_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_overview_summary_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_overview_summary_get_with_http_info(site_id, opts = {}) ⇒ Array<(OverviewStat, Integer, Hash)>

Get summary for analytics Get a summary of the most common statistics for your site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page_id (Integer)

    Id for specific page.

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OverviewStat, Integer, Hash)>)

    OverviewStat data, response status code and response headers



6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6919

def sites_site_id_analytics_overview_summary_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_overview_summary_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_overview_summary_get"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/overview/summary'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OverviewStat'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_overview_summary_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_overview_summary_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get(site_id, opts = {}) ⇒ DirectTrafficList

Get direct traffic from traffic sources Entry pages for the visits that have started through a direct entry to your website (for example from a bookmark) and not through an external referrer or search engine.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



6983
6984
6985
6986
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 6983

def sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(DirectTrafficList, Integer, Hash)>

Get direct traffic from traffic sources Entry pages for the visits that have started through a direct entry to your website (for example from a bookmark) and not through an external referrer or search engine.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(DirectTrafficList, Integer, Hash)>)

    DirectTrafficList data, response status code and response headers



7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7000

def sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/direct_traffic_entry_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DirectTrafficList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get(site_id, page_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for direct traffic from traffic sources A series of historical data points showing the direct traffic from traffic sources. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7082
7083
7084
7085
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7082

def sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get(site_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get_with_http_info(site_id, page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get_with_http_info(site_id, page_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for direct traffic from traffic sources A series of historical data points showing the direct traffic from traffic sources. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7098

def sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get_with_http_info(site_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/direct_traffic_entry_pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_direct_traffic_entry_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get(site_id, domain_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for external referring domains from traffic sources A series of historical data points showing the visits from external domains that have referred visitors to your website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7179
7180
7181
7182
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7179

def sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get(site_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get_with_http_info(site_id, domain_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get_with_http_info(site_id, domain_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for external referring domains from traffic sources A series of historical data points showing the visits from external domains that have referred visitors to your website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7196

def sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get_with_http_info(site_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_domains/{domain_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get(site_id, domain_id, opts = {}) ⇒ ExternalReferringDomainPageList

Get referring pages from an external referring domain from traffic sources The referring pages on the chosen external domain, that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



7279
7280
7281
7282
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7279

def sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get(site_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get_with_http_info(site_id, domain_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get_with_http_info(site_id, domain_id, opts = {}) ⇒ Array<(ExternalReferringDomainPageList, Integer, Hash)>

Get referring pages from an external referring domain from traffic sources The referring pages on the chosen external domain, that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7297

def sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get_with_http_info(site_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_domains/{domain_id}/referring_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExternalReferringDomainPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_domains_domain_id_referring_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_domains_get(site_id, opts = {}) ⇒ ExternalReferringDomainList

Get external referring domains from traffic sources External domains that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



7380
7381
7382
7383
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7380

def sites_site_id_analytics_traffic_sources_external_referring_domains_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_domains_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_domains_get_with_http_info(site_id, opts = {}) ⇒ Array<(ExternalReferringDomainList, Integer, Hash)>

Get external referring domains from traffic sources External domains that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(ExternalReferringDomainList, Integer, Hash)>)

    ExternalReferringDomainList data, response status code and response headers



7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7397

def sites_site_id_analytics_traffic_sources_external_referring_domains_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_domains'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExternalReferringDomainList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_domains_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_domains_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get(site_id, external_page_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for external referring pages from traffic sources A series of historical data points showing the visits from external pages that have referred visitors to your website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • external_page_id (Integer)

    Id for specific external referring page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7476
7477
7478
7479
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7476

def sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get(site_id, external_page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get_with_http_info(site_id, external_page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get_with_http_info(site_id, external_page_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for external referring pages from traffic sources A series of historical data points showing the visits from external pages that have referred visitors to your website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • external_page_id (Integer)

    Id for specific external referring page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7493

def sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get_with_http_info(site_id, external_page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get"
  end
  # verify the required parameter 'external_page_id' is set
  if @api_client.config.client_side_validation && external_page_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_pages/{external_page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'external_page_id' + '}', CGI.escape(external_page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get(site_id, external_page_id, opts = {}) ⇒ ExternalReferringPageLandingPageList

Get landing pages from external referring pages from traffic sources The landing pages by external pages that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • external_page_id (Integer)

    Id for specific external referring page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7574
7575
7576
7577
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7574

def sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get(site_id, external_page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get_with_http_info(site_id, external_page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get_with_http_info(site_id, external_page_id, opts = {}) ⇒ Array<(ExternalReferringPageLandingPageList, Integer, Hash)>

Get landing pages from external referring pages from traffic sources The landing pages by external pages that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • external_page_id (Integer)

    Id for specific external referring page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7590

def sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get_with_http_info(site_id, external_page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get"
  end
  # verify the required parameter 'external_page_id' is set
  if @api_client.config.client_side_validation && external_page_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_pages/{external_page_id}/landing_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'external_page_id' + '}', CGI.escape(external_page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExternalReferringPageLandingPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get(site_id, external_page_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for landing pages from external referring pages from traffic sources A series of historical data points showing the visits on landing pages by external pages that have referred visitors to your website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • external_page_id (Integer)

    Id for specific external referring page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7671
7672
7673
7674
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7671

def sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get(site_id, external_page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get_with_http_info(site_id, external_page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get_with_http_info(site_id, external_page_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for landing pages from external referring pages from traffic sources A series of historical data points showing the visits on landing pages by external pages that have referred visitors to your website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • external_page_id (Integer)

    Id for specific external referring page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7688

def sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get_with_http_info(site_id, external_page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get"
  end
  # verify the required parameter 'external_page_id' is set
  if @api_client.config.client_side_validation && external_page_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_pages/{external_page_id}/landing_pages/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'external_page_id' + '}', CGI.escape(external_page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_pages_external_page_id_landing_pages_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_get(site_id, opts = {}) ⇒ ExternalReferringPageList

Get external referring pages from traffic sources Pages on external domains that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



7770
7771
7772
7773
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7770

def sites_site_id_analytics_traffic_sources_external_referring_pages_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_referring_pages_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_referring_pages_get_with_http_info(site_id, opts = {}) ⇒ Array<(ExternalReferringPageList, Integer, Hash)>

Get external referring pages from traffic sources Pages on external domains that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(ExternalReferringPageList, Integer, Hash)>)

    ExternalReferringPageList data, response status code and response headers



7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7787

def sites_site_id_analytics_traffic_sources_external_referring_pages_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_referring_pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExternalReferringPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_referring_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_referring_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_search_terms_get(site_id, opts = {}) ⇒ ExternalSearchTermList

Get external search terms from traffic sources Search terms that have been used on external search engines to reach the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



7866
7867
7868
7869
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7866

def sites_site_id_analytics_traffic_sources_external_search_terms_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_search_terms_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_search_terms_get_with_http_info(site_id, opts = {}) ⇒ Array<(ExternalSearchTermList, Integer, Hash)>

Get external search terms from traffic sources Search terms that have been used on external search engines to reach the website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(ExternalSearchTermList, Integer, Hash)>)

    ExternalSearchTermList data, response status code and response headers



7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7883

def sites_site_id_analytics_traffic_sources_external_search_terms_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_search_terms'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExternalSearchTermList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_search_terms_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get(site_id, search_term_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for external search terms from traffic sources A series of historical data points showing the visits from search terms that have been used on external search engines to reach the website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



7961
7962
7963
7964
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7961

def sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get(site_id, search_term_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get_with_http_info(site_id, search_term_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get_with_http_info(site_id, search_term_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for external search terms from traffic sources A series of historical data points showing the visits from search terms that have been used on external search engines to reach the website. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 7977

def sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get_with_http_info(site_id, search_term_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get"
  end
  # verify the required parameter 'search_term_id' is set
  if @api_client.config.client_side_validation && search_term_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_term_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_search_terms/{search_term_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_term_id' + '}', CGI.escape(search_term_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get(site_id, search_term_id, opts = {}) ⇒ ExternalSearchTermPageList

Get external search terms pages from traffic sources The pages on your website reached by the particular search term.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8058
8059
8060
8061
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8058

def sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get(site_id, search_term_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get_with_http_info(site_id, search_term_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get_with_http_info(site_id, search_term_id, opts = {}) ⇒ Array<(ExternalSearchTermPageList, Integer, Hash)>

Get external search terms pages from traffic sources The pages on your website reached by the particular search term.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(ExternalSearchTermPageList, Integer, Hash)>)

    ExternalSearchTermPageList data, response status code and response headers



8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8075

def sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get_with_http_info(site_id, search_term_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get"
  end
  # verify the required parameter 'search_term_id' is set
  if @api_client.config.client_side_validation && search_term_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_term_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_search_terms/{search_term_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_term_id' + '}', CGI.escape(search_term_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExternalSearchTermPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get(site_id, search_term_id, page_id, opts = {}) ⇒ VisitsGraphItemList

Get historical data for external search terms pages from traffic sources A series of historical data points showing the visits on pages on your website reached by the particular search term. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8156
8157
8158
8159
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8156

def sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get(site_id, search_term_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get_with_http_info(site_id, search_term_id, page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get_with_http_info(site_id, search_term_id, page_id, opts = {}) ⇒ Array<(VisitsGraphItemList, Integer, Hash)>

Get historical data for external search terms pages from traffic sources A series of historical data points showing the visits on pages on your website reached by the particular search term. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_term_id (Integer)

    Id of a specific search term.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(VisitsGraphItemList, Integer, Hash)>)

    VisitsGraphItemList data, response status code and response headers



8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8172

def sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get_with_http_info(site_id, search_term_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get"
  end
  # verify the required parameter 'search_term_id' is set
  if @api_client.config.client_side_validation && search_term_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_term_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/external_search_terms/{search_term_id}/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_term_id' + '}', CGI.escape(search_term_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_external_search_terms_search_term_id_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_get(site_id, opts = {}) ⇒ SearchEngineOrganizationList

Get search engines from traffic sources Search engines that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



8255
8256
8257
8258
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8255

def sites_site_id_analytics_traffic_sources_search_engines_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_get_with_http_info(site_id, opts = {}) ⇒ Array<(SearchEngineOrganizationList, Integer, Hash)>

Get search engines from traffic sources Search engines that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8271

def sites_site_id_analytics_traffic_sources_search_engines_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SearchEngineOrganizationList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get historical data for specific search engine domain link from traffic sources A series of historical data points showing the visits for the specified search engine domain link. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • domain_link_id (Integer)

    Id for specific domain link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8351
8352
8353
8354
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8351

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get(site_id, search_engine_id, domain_id, domain_link_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get_with_http_info(site_id, search_engine_id, domain_id, domain_link_id, opts)
  data
end

Get historical data for specific search engine domain link from traffic sources A series of historical data points showing the visits for the specified search engine domain link. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • domain_link_id (Integer)

    Id for specific domain link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8370

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get_with_http_info(site_id, search_engine_id, domain_id, domain_link_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  # verify the required parameter 'domain_link_id' is set
  if @api_client.config.client_side_validation && domain_link_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_link_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/domains/{domain_id}/domain_links/{domain_link_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'domain_link_id' + '}', CGI.escape(domain_link_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_domain_link_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get links for specific search engine domain from traffic sources Get the referring links for the specified search engine domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



8461
8462
8463
8464
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8461

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get(site_id, search_engine_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get_with_http_info(site_id, search_engine_id, domain_id, opts)
  data
end

Get links for specific search engine domain from traffic sources Get the referring links for the specified search engine domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(SearchEngineDomainLinkList, Integer, Hash)>)

    SearchEngineDomainLinkList data, response status code and response headers



8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8479

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get_with_http_info(site_id, search_engine_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/domains/{domain_id}/domain_links'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SearchEngineDomainLinkList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_domain_links_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get(site_id, search_engine_id, domain_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific search engine domain from traffic sources A series of historical data points showing the visits for the specified search engine domain. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8566
8567
8568
8569
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8566

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get(site_id, search_engine_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get_with_http_info(site_id, search_engine_id, domain_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get_with_http_info(site_id, search_engine_id, domain_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific search engine domain from traffic sources A series of historical data points showing the visits for the specified search engine domain. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8584

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get_with_http_info(site_id, search_engine_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/domains/{domain_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get(site_id, search_engine_id, domain_id, opts = {}) ⇒ SearchEngineDomainPageList

Get pages for specific search engine domain from traffic sources Get the pages that was reached from the specified search engine domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



8672
8673
8674
8675
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8672

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get(site_id, search_engine_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get_with_http_info(site_id, search_engine_id, domain_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get_with_http_info(site_id, search_engine_id, domain_id, opts = {}) ⇒ Array<(SearchEngineDomainPageList, Integer, Hash)>

Get pages for specific search engine domain from traffic sources Get the pages that was reached from the specified search engine domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(SearchEngineDomainPageList, Integer, Hash)>)

    SearchEngineDomainPageList data, response status code and response headers



8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8691

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get_with_http_info(site_id, search_engine_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/domains/{domain_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SearchEngineDomainPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get(site_id, search_engine_id, domain_id, page_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific search engine domain page from traffic sources A series of historical data points showing the visits for the specified search engine domain page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8783
8784
8785
8786
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8783

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get(site_id, search_engine_id, domain_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get_with_http_info(site_id, search_engine_id, domain_id, page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get_with_http_info(site_id, search_engine_id, domain_id, page_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific search engine domain page from traffic sources A series of historical data points showing the visits for the specified search engine domain page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • domain_id (Integer)

    Id for specific domain.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8801

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get_with_http_info(site_id, search_engine_id, domain_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/domains/{domain_id}/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_domain_id_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get(site_id, search_engine_id, opts = {}) ⇒ SearchEngineDomainList

Get domains for search engines from traffic sources Get the referring domains for the specified search engine.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



8890
8891
8892
8893
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8890

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get(site_id, search_engine_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get_with_http_info(site_id, search_engine_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get_with_http_info(site_id, search_engine_id, opts = {}) ⇒ Array<(SearchEngineDomainList, Integer, Hash)>

Get domains for search engines from traffic sources Get the referring domains for the specified search engine.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(SearchEngineDomainList, Integer, Hash)>)

    SearchEngineDomainList data, response status code and response headers



8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8907

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get_with_http_info(site_id, search_engine_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/domains'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SearchEngineDomainList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_domains_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get(site_id, search_engine_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific search engine from traffic sources A series of historical data points showing the visits for the specified search engine. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



8989
8990
8991
8992
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 8989

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get(site_id, search_engine_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get_with_http_info(site_id, search_engine_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get_with_http_info(site_id, search_engine_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific search engine from traffic sources A series of historical data points showing the visits for the specified search engine. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9006

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get_with_http_info(site_id, search_engine_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get(site_id, search_engine_id, opts = {}) ⇒ SearchEnginePageList

Get pages for specific search engine from traffic sources Get the pages that was reached from the specified search engine.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



9089
9090
9091
9092
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9089

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get(site_id, search_engine_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get_with_http_info(site_id, search_engine_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get_with_http_info(site_id, search_engine_id, opts = {}) ⇒ Array<(SearchEnginePageList, Integer, Hash)>

Get pages for specific search engine from traffic sources Get the pages that was reached from the specified search engine.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(SearchEnginePageList, Integer, Hash)>)

    SearchEnginePageList data, response status code and response headers



9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9107

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get_with_http_info(site_id, search_engine_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SearchEnginePageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get(site_id, search_engine_id, page_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific search engine page from traffic sources A series of historical data points showing the visits for the specified search engine page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9194
9195
9196
9197
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9194

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get(site_id, search_engine_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get_with_http_info(site_id, search_engine_id, page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get_with_http_info(site_id, search_engine_id, page_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific search engine page from traffic sources A series of historical data points showing the visits for the specified search engine page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • search_engine_id (Integer)

    Id for specific search engine.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9211

def sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get_with_http_info(site_id, search_engine_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get"
  end
  # verify the required parameter 'search_engine_id' is set
  if @api_client.config.client_side_validation && search_engine_id.nil?
    fail ArgumentError, "Missing the required parameter 'search_engine_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/search_engines/{search_engine_id}/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'search_engine_id' + '}', CGI.escape(search_engine_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_search_engines_search_engine_id_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_get(site_id, opts = {}) ⇒ SocialMediaOrganizationList

Get social media organisations from traffic sources Get the social media organisations that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



9295
9296
9297
9298
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9295

def sites_site_id_analytics_traffic_sources_social_media_organisations_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_get_with_http_info(site_id, opts = {}) ⇒ Array<(SocialMediaOrganizationList, Integer, Hash)>

Get social media organisations from traffic sources Get the social media organisations that have referred visitors to your website.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(SocialMediaOrganizationList, Integer, Hash)>)

    SocialMediaOrganizationList data, response status code and response headers



9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9311

def sites_site_id_analytics_traffic_sources_social_media_organisations_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SocialMediaOrganizationList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get historical data for specific social media organisation domain link from traffic sources A series of historical data points showing the visits for the specified social media organisation domain link. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • domain_link_id (Integer)

    Id for specific domain link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9391
9392
9393
9394
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9391

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get(site_id, social_media_organisation_id, domain_id, domain_link_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, domain_link_id, opts)
  data
end

Get historical data for specific social media organisation domain link from traffic sources A series of historical data points showing the visits for the specified social media organisation domain link. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • domain_link_id (Integer)

    Id for specific domain link/URL.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9410

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, domain_link_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  # verify the required parameter 'domain_link_id' is set
  if @api_client.config.client_side_validation && domain_link_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_link_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/domains/{domain_id}/domain_links/{domain_link_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'domain_link_id' + '}', CGI.escape(domain_link_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_domain_link_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get links for specific social media organisation domain from traffic sources Get the referring links for the specified social media organisation domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



9501
9502
9503
9504
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9501

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get(site_id, social_media_organisation_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts)
  data
end

Get links for specific social media organisation domain from traffic sources Get the referring links for the specified social media organisation domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(SocialMediaDomainLinkList, Integer, Hash)>)

    SocialMediaDomainLinkList data, response status code and response headers



9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9519

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/domains/{domain_id}/domain_links'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SocialMediaDomainLinkList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_domain_links_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get(site_id, social_media_organisation_id, domain_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific social media organisation domain from traffic sources A series of historical data points showing the visits for the specified social media organisation domain. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9606
9607
9608
9609
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9606

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get(site_id, social_media_organisation_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific social media organisation domain from traffic sources A series of historical data points showing the visits for the specified social media organisation domain. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9624

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/domains/{domain_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get(site_id, social_media_organisation_id, domain_id, opts = {}) ⇒ SocialMediaDomainPageList

Get pages for specific social media organisation domain from traffic sources Get the pages that was reached from the specified social media organisation domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



9712
9713
9714
9715
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9712

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get(site_id, social_media_organisation_id, domain_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts = {}) ⇒ Array<(SocialMediaDomainPageList, Integer, Hash)>

Get pages for specific social media organisation domain from traffic sources Get the pages that was reached from the specified social media organisation domain.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(SocialMediaDomainPageList, Integer, Hash)>)

    SocialMediaDomainPageList data, response status code and response headers



9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9731

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get_with_http_info(site_id, social_media_organisation_id, domain_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/domains/{domain_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SocialMediaDomainPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get(site_id, social_media_organisation_id, domain_id, page_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific social media organisation domain page from traffic sources A series of historical data points showing the visits for the specified social media organisation domain page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9823
9824
9825
9826
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9823

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get(site_id, social_media_organisation_id, domain_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, page_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific social media organisation domain page from traffic sources A series of historical data points showing the visits for the specified social media organisation domain page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • domain_id (Integer)

    Id for specific domain.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9841

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get_with_http_info(site_id, social_media_organisation_id, domain_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get"
  end
  # verify the required parameter 'domain_id' is set
  if @api_client.config.client_side_validation && domain_id.nil?
    fail ArgumentError, "Missing the required parameter 'domain_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/domains/{domain_id}/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s)).sub('{' + 'domain_id' + '}', CGI.escape(domain_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_domain_id_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get(site_id, social_media_organisation_id, opts = {}) ⇒ SocialMediaDomainList

Get domains for social media organisation from traffic sources Get the referring domains for the specified social media organisation.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



9930
9931
9932
9933
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9930

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get(site_id, social_media_organisation_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get_with_http_info(site_id, social_media_organisation_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get_with_http_info(site_id, social_media_organisation_id, opts = {}) ⇒ Array<(SocialMediaDomainList, Integer, Hash)>

Get domains for social media organisation from traffic sources Get the referring domains for the specified social media organisation.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(SocialMediaDomainList, Integer, Hash)>)

    SocialMediaDomainList data, response status code and response headers



9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 9947

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get_with_http_info(site_id, social_media_organisation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/domains'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SocialMediaDomainList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_domains_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get(site_id, social_media_organisation_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific social media organisation from traffic sources A series of historical data points showing the visits for the specified social media organisation. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10029
10030
10031
10032
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10029

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get(site_id, social_media_organisation_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get_with_http_info(site_id, social_media_organisation_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get_with_http_info(site_id, social_media_organisation_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific social media organisation from traffic sources A series of historical data points showing the visits for the specified social media organisation. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10046

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get_with_http_info(site_id, social_media_organisation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get(site_id, social_media_organisation_id, opts = {}) ⇒ SocialMediaPageList

Get pages for specific social media organisation from traffic sources Get the pages that was reached from the specified social media organisation.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



10129
10130
10131
10132
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10129

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get(site_id, social_media_organisation_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get_with_http_info(site_id, social_media_organisation_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get_with_http_info(site_id, social_media_organisation_id, opts = {}) ⇒ Array<(SocialMediaPageList, Integer, Hash)>

Get pages for specific social media organisation from traffic sources Get the pages that was reached from the specified social media organisation.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(SocialMediaPageList, Integer, Hash)>)

    SocialMediaPageList data, response status code and response headers



10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10147

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get_with_http_info(site_id, social_media_organisation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SocialMediaPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get(site_id, social_media_organisation_id, page_id, opts = {}) ⇒ VisitsReferralsGraphItemList

Get historical data for specific social media organisation page from traffic sources A series of historical data points showing the visits for the specified social media organisation page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10234
10235
10236
10237
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10234

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get(site_id, social_media_organisation_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get_with_http_info(site_id, social_media_organisation_id, page_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get_with_http_info(site_id, social_media_organisation_id, page_id, opts = {}) ⇒ Array<(VisitsReferralsGraphItemList, Integer, Hash)>

Get historical data for specific social media organisation page from traffic sources A series of historical data points showing the visits for the specified social media organisation page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • social_media_organisation_id (Integer)

    Id for specific social media.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10251

def sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get_with_http_info(site_id, social_media_organisation_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get"
  end
  # verify the required parameter 'social_media_organisation_id' is set
  if @api_client.config.client_side_validation && social_media_organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'social_media_organisation_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/social_media_organisations/{social_media_organisation_id}/pages/{page_id}/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'social_media_organisation_id' + '}', CGI.escape(social_media_organisation_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'VisitsReferralsGraphItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_social_media_organisations_social_media_organisation_id_pages_page_id_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_summary_get(site_id, opts = {}) ⇒ TrafficSourceSummaryList

Get an overview of traffic sources Get an overview of traffic sources

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10335
10336
10337
10338
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10335

def sites_site_id_analytics_traffic_sources_summary_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_summary_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_summary_get_with_http_info(site_id, opts = {}) ⇒ Array<(TrafficSourceSummaryList, Integer, Hash)>

Get an overview of traffic sources Get an overview of traffic sources

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(TrafficSourceSummaryList, Integer, Hash)>)

    TrafficSourceSummaryList data, response status code and response headers



10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10351

def sites_site_id_analytics_traffic_sources_summary_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/summary'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TrafficSourceSummaryList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_summary_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_traffic_sources_summary_history_get(site_id, opts = {}) ⇒ TrafficSourceSummaryTrendGraphList

Get historical data for traffic sources Get historical data for traffic sources

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10428
10429
10430
10431
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10428

def sites_site_id_analytics_traffic_sources_summary_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_traffic_sources_summary_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_traffic_sources_summary_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(TrafficSourceSummaryTrendGraphList, Integer, Hash)>

Get historical data for traffic sources Get historical data for traffic sources

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10444

def sites_site_id_analytics_traffic_sources_summary_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/traffic_sources/summary/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TrafficSourceSummaryTrendGraphList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_traffic_sources_summary_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_traffic_sources_summary_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_get(site_id, opts = {}) ⇒ SurveyList

Get surveys from user feedback Get the surveys created for your account.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10519
10520
10521
10522
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10519

def sites_site_id_analytics_user_feedback_surveys_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_get_with_http_info(site_id, opts = {}) ⇒ Array<(SurveyList, Integer, Hash)>

Get surveys from user feedback Get the surveys created for your account.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(SurveyList, Integer, Hash)>)

    SurveyList data, response status code and response headers



10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10533

def sites_site_id_analytics_user_feedback_surveys_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SurveyList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get(site_id, survey_id, opts = {}) ⇒ FeedbackPageList

Get feedbacks for specific survey from user feedback Get the feedbacks received for the specified survey. Comments and ratings from actual users of your website gives you real user experience data, which cannot be gained from statistics alone. User comments enable you to make specific changes to your website which you know will benefit users of your site, and not just changes which you think will benefit them.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



10610
10611
10612
10613
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10610

def sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get(site_id, survey_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get_with_http_info(site_id, survey_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get_with_http_info(site_id, survey_id, opts = {}) ⇒ Array<(FeedbackPageList, Integer, Hash)>

Get feedbacks for specific survey from user feedback Get the feedbacks received for the specified survey. Comments and ratings from actual users of your website gives you real user experience data, which cannot be gained from statistics alone. User comments enable you to make specific changes to your website which you know will benefit users of your site, and not just changes which you think will benefit them.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(FeedbackPageList, Integer, Hash)>)

    FeedbackPageList data, response status code and response headers



10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10628

def sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get_with_http_info(site_id, survey_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get"
  end
  # verify the required parameter 'survey_id' is set
  if @api_client.config.client_side_validation && survey_id.nil?
    fail ArgumentError, "Missing the required parameter 'survey_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys/{survey_id}/feedbacks'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'survey_id' + '}', CGI.escape(survey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FeedbackPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get(site_id, survey_id, opts = {}) ⇒ FeedbackOverviewGraphSliceList

Get historical data for specific survey from user feedback A series of historical data points showing the satisfaction scores and amount of ratings, comments and views for the specified survey. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10711
10712
10713
10714
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10711

def sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get(site_id, survey_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get_with_http_info(site_id, survey_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get_with_http_info(site_id, survey_id, opts = {}) ⇒ Array<(FeedbackOverviewGraphSliceList, Integer, Hash)>

Get historical data for specific survey from user feedback A series of historical data points showing the satisfaction scores and amount of ratings, comments and views for the specified survey. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10728

def sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get_with_http_info(site_id, survey_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get"
  end
  # verify the required parameter 'survey_id' is set
  if @api_client.config.client_side_validation && survey_id.nil?
    fail ArgumentError, "Missing the required parameter 'survey_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys/{survey_id}/feedbacks/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'survey_id' + '}', CGI.escape(survey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FeedbackOverviewGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_survey_id_feedbacks_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get(site_id, survey_id, opts = {}) ⇒ FeedbackIgnoredList

Get ignored feedbacks for specific survey from user feedback Get the feedback that has been ignored.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



10810
10811
10812
10813
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10810

def sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get(site_id, survey_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get_with_http_info(site_id, survey_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get_with_http_info(site_id, survey_id, opts = {}) ⇒ Array<(FeedbackIgnoredList, Integer, Hash)>

Get ignored feedbacks for specific survey from user feedback Get the feedback that has been ignored.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(FeedbackIgnoredList, Integer, Hash)>)

    FeedbackIgnoredList data, response status code and response headers



10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10827

def sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get_with_http_info(site_id, survey_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get"
  end
  # verify the required parameter 'survey_id' is set
  if @api_client.config.client_side_validation && survey_id.nil?
    fail ArgumentError, "Missing the required parameter 'survey_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys/{survey_id}/ignored_feedbacks'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'survey_id' + '}', CGI.escape(survey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FeedbackIgnoredList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_survey_id_ignored_feedbacks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get(site_id, survey_id, opts = {}) ⇒ PageWithFeedbackList

Get pages with feedback for specific survey from user feedback Get the pages that have received feedback..

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:



10910
10911
10912
10913
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10910

def sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get(site_id, survey_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get_with_http_info(site_id, survey_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get_with_http_info(site_id, survey_id, opts = {}) ⇒ Array<(PageWithFeedbackList, Integer, Hash)>

Get pages with feedback for specific survey from user feedback Get the pages that have received feedback..

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

  • :search_in (String)

    Specified query must match either url or title. (default to ‘url’)

Returns:

  • (Array<(PageWithFeedbackList, Integer, Hash)>)

    PageWithFeedbackList data, response status code and response headers



10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 10928

def sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get_with_http_info(site_id, survey_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get"
  end
  # verify the required parameter 'survey_id' is set
  if @api_client.config.client_side_validation && survey_id.nil?
    fail ArgumentError, "Missing the required parameter 'survey_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get, must be greater than or equal to 1.'
  end

  allowable_values = ["url", "title"]
  if @api_client.config.client_side_validation && opts[:'search_in'] && !allowable_values.include?(opts[:'search_in'])
    fail ArgumentError, "invalid value for \"search_in\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys/{survey_id}/pages_with_feedback'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'survey_id' + '}', CGI.escape(survey_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'search_in'] = opts[:'search_in'] if !opts[:'search_in'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PageWithFeedbackList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get(site_id, survey_id, page_id, opts = {}) ⇒ FeedbackOnPageList

Get ratings for specific survey page with feedback from user feedback Get the feedbacks received for the specified survey at the specified page. Comments and ratings from actual users of your website gives you real user experience data, which cannot be gained from statistics alone. User comments enable you to make specific changes to your website which you know will benefit users of your site, and not just changes which you think will benefit them.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



11016
11017
11018
11019
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11016

def sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get(site_id, survey_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get_with_http_info(site_id, survey_id, page_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get_with_http_info(site_id, survey_id, page_id, opts = {}) ⇒ Array<(FeedbackOnPageList, Integer, Hash)>

Get ratings for specific survey page with feedback from user feedback Get the feedbacks received for the specified survey at the specified page. Comments and ratings from actual users of your website gives you real user experience data, which cannot be gained from statistics alone. User comments enable you to make specific changes to your website which you know will benefit users of your site, and not just changes which you think will benefit them.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(FeedbackOnPageList, Integer, Hash)>)

    FeedbackOnPageList data, response status code and response headers



11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11034

def sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get_with_http_info(site_id, survey_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get"
  end
  # verify the required parameter 'survey_id' is set
  if @api_client.config.client_side_validation && survey_id.nil?
    fail ArgumentError, "Missing the required parameter 'survey_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys/{survey_id}/pages_with_feedback/{page_id}/ratings'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'survey_id' + '}', CGI.escape(survey_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FeedbackOnPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get(site_id, survey_id, page_id, opts = {}) ⇒ FeedbackRatingGraphList

Get historical rating data for specific survey page with feedback from user feedback A series of historical data points showing the amount of ratings for the specified survey on the specified page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11120
11121
11122
11123
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11120

def sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get(site_id, survey_id, page_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get_with_http_info(site_id, survey_id, page_id, opts)
  data
end

#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get_with_http_info(site_id, survey_id, page_id, opts = {}) ⇒ Array<(FeedbackRatingGraphList, Integer, Hash)>

Get historical rating data for specific survey page with feedback from user feedback A series of historical data points showing the amount of ratings for the specified survey on the specified page. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • survey_id (Integer)

    Id of a specific survey.

  • page_id (Integer)

    Id for specific page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(FeedbackRatingGraphList, Integer, Hash)>)

    FeedbackRatingGraphList data, response status code and response headers



11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11137

def sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get_with_http_info(site_id, survey_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get"
  end
  # verify the required parameter 'survey_id' is set
  if @api_client.config.client_side_validation && survey_id.nil?
    fail ArgumentError, "Missing the required parameter 'survey_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get"
  end
  # verify the required parameter 'page_id' is set
  if @api_client.config.client_side_validation && page_id.nil?
    fail ArgumentError, "Missing the required parameter 'page_id' when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/user_feedback/surveys/{survey_id}/pages_with_feedback/{page_id}/ratings/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'survey_id' + '}', CGI.escape(survey_id.to_s)).sub('{' + 'page_id' + '}', CGI.escape(page_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FeedbackRatingGraphList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_user_feedback_surveys_survey_id_pages_with_feedback_page_id_ratings_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get(site_id, browser_name, opts = {}) ⇒ BrowserVersionList

Get versions for specific browser from visitors Get the versions of the specified browsers that have been used to visit your site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • browser_name (String)

    Name of specific browser (ie. &quot;Chrome&quot;, &quot;Firefox&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11222
11223
11224
11225
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11222

def sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get(site_id, browser_name, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get_with_http_info(site_id, browser_name, opts)
  data
end

#sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get_with_http_info(site_id, browser_name, opts = {}) ⇒ Array<(BrowserVersionList, Integer, Hash)>

Get versions for specific browser from visitors Get the versions of the specified browsers that have been used to visit your site.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • browser_name (String)

    Name of specific browser (ie. &quot;Chrome&quot;, &quot;Firefox&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(BrowserVersionList, Integer, Hash)>)

    BrowserVersionList data, response status code and response headers



11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11239

def sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get_with_http_info(site_id, browser_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get"
  end
  # verify the required parameter 'browser_name' is set
  if @api_client.config.client_side_validation && browser_name.nil?
    fail ArgumentError, "Missing the required parameter 'browser_name' when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/browsers/browser_names/{browser_name}/versions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'browser_name' + '}', CGI.escape(browser_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BrowserVersionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get(site_id, browser_name, opts = {}) ⇒ BrowserVersionGraphSliceList

Get historical data for a specific browsers versions from visitors A series of historical data points showing the amount of visits for a series of versions of the specified browser. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • browser_name (String)

    Name of specific browser (ie. &quot;Chrome&quot;, &quot;Firefox&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11321
11322
11323
11324
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11321

def sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get(site_id, browser_name, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get_with_http_info(site_id, browser_name, opts)
  data
end

#sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get_with_http_info(site_id, browser_name, opts = {}) ⇒ Array<(BrowserVersionGraphSliceList, Integer, Hash)>

Get historical data for a specific browsers versions from visitors A series of historical data points showing the amount of visits for a series of versions of the specified browser. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • browser_name (String)

    Name of specific browser (ie. &quot;Chrome&quot;, &quot;Firefox&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11338

def sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get_with_http_info(site_id, browser_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get"
  end
  # verify the required parameter 'browser_name' is set
  if @api_client.config.client_side_validation && browser_name.nil?
    fail ArgumentError, "Missing the required parameter 'browser_name' when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/browsers/browser_names/{browser_name}/versions/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'browser_name' + '}', CGI.escape(browser_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BrowserVersionGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_browsers_browser_names_browser_name_versions_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_browsers_get(site_id, opts = {}) ⇒ BrowserList

Get browsers from visitors Get the browsers used by your visitors.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11419
11420
11421
11422
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11419

def sites_site_id_analytics_visitors_browsers_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_browsers_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_browsers_get_with_http_info(site_id, opts = {}) ⇒ Array<(BrowserList, Integer, Hash)>

Get browsers from visitors Get the browsers used by your visitors.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(BrowserList, Integer, Hash)>)

    BrowserList data, response status code and response headers



11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11435

def sites_site_id_analytics_visitors_browsers_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_browsers_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/browsers'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BrowserList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_browsers_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_browsers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_browsers_history_get(site_id, opts = {}) ⇒ BrowserGraphSliceList

Get historical data for browsers from visitors A series of historical data points showing the amount of visits for a series of browsers. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11512
11513
11514
11515
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11512

def sites_site_id_analytics_visitors_browsers_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_browsers_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_browsers_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(BrowserGraphSliceList, Integer, Hash)>

Get historical data for browsers from visitors A series of historical data points showing the amount of visits for a series of browsers. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(BrowserGraphSliceList, Integer, Hash)>)

    BrowserGraphSliceList data, response status code and response headers



11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11528

def sites_site_id_analytics_visitors_browsers_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_browsers_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_browsers_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/browsers/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BrowserGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_browsers_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_browsers_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_countries_country_id_regions_get(site_id, country_id, opts = {}) ⇒ RegionList

Get regions of countries from visitors Overview of where visitors come from divided by region per country.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • country_id (Integer)

    Id for specific country.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



11607
11608
11609
11610
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11607

def sites_site_id_analytics_visitors_countries_country_id_regions_get(site_id, country_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_countries_country_id_regions_get_with_http_info(site_id, country_id, opts)
  data
end

#sites_site_id_analytics_visitors_countries_country_id_regions_get_with_http_info(site_id, country_id, opts = {}) ⇒ Array<(RegionList, Integer, Hash)>

Get regions of countries from visitors Overview of where visitors come from divided by region per country.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • country_id (Integer)

    Id for specific country.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(RegionList, Integer, Hash)>)

    RegionList data, response status code and response headers



11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11625

def sites_site_id_analytics_visitors_countries_country_id_regions_get_with_http_info(site_id, country_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get"
  end
  # verify the required parameter 'country_id' is set
  if @api_client.config.client_side_validation && country_id.nil?
    fail ArgumentError, "Missing the required parameter 'country_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/countries/{country_id}/regions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'country_id' + '}', CGI.escape(country_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RegionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_countries_country_id_regions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get(site_id, country_id, region_id, opts = {}) ⇒ CityList

Get cities of regions of countries from visitors Overview of where visitors come from divided by city per region per country.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • country_id (Integer)

    Id for specific country.

  • region_id (Integer)

    Id for specific region.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



11710
11711
11712
11713
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11710

def sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get(site_id, country_id, region_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get_with_http_info(site_id, country_id, region_id, opts)
  data
end

#sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get_with_http_info(site_id, country_id, region_id, opts = {}) ⇒ Array<(CityList, Integer, Hash)>

Get cities of regions of countries from visitors Overview of where visitors come from divided by city per region per country.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • country_id (Integer)

    Id for specific country.

  • region_id (Integer)

    Id for specific region.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CityList, Integer, Hash)>)

    CityList data, response status code and response headers



11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11729

def sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get_with_http_info(site_id, country_id, region_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get"
  end
  # verify the required parameter 'country_id' is set
  if @api_client.config.client_side_validation && country_id.nil?
    fail ArgumentError, "Missing the required parameter 'country_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get"
  end
  # verify the required parameter 'region_id' is set
  if @api_client.config.client_side_validation && region_id.nil?
    fail ArgumentError, "Missing the required parameter 'region_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/countries/{country_id}/regions/{region_id}/cities'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'country_id' + '}', CGI.escape(country_id.to_s)).sub('{' + 'region_id' + '}', CGI.escape(region_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CityList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_countries_country_id_regions_region_id_cities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_countries_get(site_id, opts = {}) ⇒ CountryList

Get countries from visitors Overview of where visitors come from divided by country.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



11816
11817
11818
11819
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11816

def sites_site_id_analytics_visitors_countries_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_countries_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_countries_get_with_http_info(site_id, opts = {}) ⇒ Array<(CountryList, Integer, Hash)>

Get countries from visitors Overview of where visitors come from divided by country.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(CountryList, Integer, Hash)>)

    CountryList data, response status code and response headers



11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11833

def sites_site_id_analytics_visitors_countries_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_countries_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_countries_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/countries'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CountryList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_countries_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_countries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_devices_get(site_id, opts = {}) ⇒ DeviceList

Get devices from visitors See which type of device is being utilised the most. The category "Desktop" includes other devices such as gaming consoles and smart TV.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



11911
11912
11913
11914
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11911

def sites_site_id_analytics_visitors_devices_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_devices_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_devices_get_with_http_info(site_id, opts = {}) ⇒ Array<(DeviceList, Integer, Hash)>

Get devices from visitors See which type of device is being utilised the most. The category &quot;Desktop&quot; includes other devices such as gaming consoles and smart TV.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(DeviceList, Integer, Hash)>)

    DeviceList data, response status code and response headers



11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 11927

def sites_site_id_analytics_visitors_devices_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_devices_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/devices'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeviceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_devices_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_devices_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_devices_history_get(site_id, opts = {}) ⇒ DeviceGraphSliceList

Get historical data for devices from visitors A series of historical data points showing the devices from visitors. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12004
12005
12006
12007
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12004

def sites_site_id_analytics_visitors_devices_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_devices_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_devices_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(DeviceGraphSliceList, Integer, Hash)>

Get historical data for devices from visitors A series of historical data points showing the devices from visitors. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(DeviceGraphSliceList, Integer, Hash)>)

    DeviceGraphSliceList data, response status code and response headers



12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12020

def sites_site_id_analytics_visitors_devices_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_devices_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_devices_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/devices/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeviceGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_devices_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_devices_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_operating_systems_get(site_id, opts = {}) ⇒ OperatingSystemList

Get operating systems from visitors A full list of the operating systems that visitors are using.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12097
12098
12099
12100
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12097

def sites_site_id_analytics_visitors_operating_systems_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_operating_systems_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_operating_systems_get_with_http_info(site_id, opts = {}) ⇒ Array<(OperatingSystemList, Integer, Hash)>

Get operating systems from visitors A full list of the operating systems that visitors are using.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OperatingSystemList, Integer, Hash)>)

    OperatingSystemList data, response status code and response headers



12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12113

def sites_site_id_analytics_visitors_operating_systems_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/operating_systems'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OperatingSystemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_operating_systems_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_operating_systems_history_get(site_id, opts = {}) ⇒ OperatingSystemGraphSliceList

Get historical data for operating systems from visitors A series of historical data points showing the operating sytems from visitors. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12190
12191
12192
12193
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12190

def sites_site_id_analytics_visitors_operating_systems_history_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_operating_systems_history_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_operating_systems_history_get_with_http_info(site_id, opts = {}) ⇒ Array<(OperatingSystemGraphSliceList, Integer, Hash)>

Get historical data for operating systems from visitors A series of historical data points showing the operating sytems from visitors. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12206

def sites_site_id_analytics_visitors_operating_systems_history_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/operating_systems/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OperatingSystemGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_operating_systems_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get(site_id, os_family, opts = {}) ⇒ OperatingSystemVersionList

Get versions of operating systems from visitors Gets a version breakdown of a operating system.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • os_family (String)

    Name of specific OS (ie. &quot;Windows&quot;, &quot;iOS&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12284
12285
12286
12287
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12284

def sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get(site_id, os_family, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get_with_http_info(site_id, os_family, opts)
  data
end

#sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get_with_http_info(site_id, os_family, opts = {}) ⇒ Array<(OperatingSystemVersionList, Integer, Hash)>

Get versions of operating systems from visitors Gets a version breakdown of a operating system.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • os_family (String)

    Name of specific OS (ie. &quot;Windows&quot;, &quot;iOS&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OperatingSystemVersionList, Integer, Hash)>)

    OperatingSystemVersionList data, response status code and response headers



12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12301

def sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get_with_http_info(site_id, os_family, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get"
  end
  # verify the required parameter 'os_family' is set
  if @api_client.config.client_side_validation && os_family.nil?
    fail ArgumentError, "Missing the required parameter 'os_family' when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/operating_systems/os_families/{os_family}/versions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'os_family' + '}', CGI.escape(os_family.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OperatingSystemVersionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get(site_id, os_family, opts = {}) ⇒ OperatingSystemVersionGraphSliceList

Get historical data for a specific OS’s versions from visitors A series of historical data points showing the amount of visits for a series of versions of the specified OS. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • os_family (String)

    Name of specific OS (ie. &quot;Windows&quot;, &quot;iOS&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12383
12384
12385
12386
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12383

def sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get(site_id, os_family, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get_with_http_info(site_id, os_family, opts)
  data
end

#sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get_with_http_info(site_id, os_family, opts = {}) ⇒ Array<(OperatingSystemVersionGraphSliceList, Integer, Hash)>

Get historical data for a specific OS&#39;s versions from visitors A series of historical data points showing the amount of visits for a series of versions of the specified OS. When viewing historical data the resolution of the data points will be dependent on the period specified. For single-day periods the resolution will be hours. For periods less than 62 days (approximately two months) the resolution will be days. For longer periods the resolution will be months.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • os_family (String)

    Name of specific OS (ie. &quot;Windows&quot;, &quot;iOS&quot; etc)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12400

def sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get_with_http_info(site_id, os_family, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get"
  end
  # verify the required parameter 'os_family' is set
  if @api_client.config.client_side_validation && os_family.nil?
    fail ArgumentError, "Missing the required parameter 'os_family' when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/operating_systems/os_families/{os_family}/versions/history'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'os_family' + '}', CGI.escape(os_family.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OperatingSystemVersionGraphSliceList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_operating_systems_os_families_os_family_versions_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_organisations_get(site_id, opts = {}) ⇒ OrganisationList

Get organisations from visitors Get a list of visiting organisations, identified through IP address.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



12482
12483
12484
12485
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12482

def sites_site_id_analytics_visitors_organisations_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_organisations_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_organisations_get_with_http_info(site_id, opts = {}) ⇒ Array<(OrganisationList, Integer, Hash)>

Get organisations from visitors Get a list of visiting organisations, identified through IP address.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(OrganisationList, Integer, Hash)>)

    OrganisationList data, response status code and response headers



12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12499

def sites_site_id_analytics_visitors_organisations_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_organisations_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/organisations'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OrganisationList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_organisations_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_organisations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get(site_id, organisation_id, opts = {}) ⇒ OrganisationIpList

Get a list IP addresses for a specific organisation from visitors Get the IP addresses identified as belonging to a specific organisation from visitors.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • organisation_id (Integer)

    Id for specific organisation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12578
12579
12580
12581
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12578

def sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get(site_id, organisation_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get_with_http_info(site_id, organisation_id, opts)
  data
end

#sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get_with_http_info(site_id, organisation_id, opts = {}) ⇒ Array<(OrganisationIpList, Integer, Hash)>

Get a list IP addresses for a specific organisation from visitors Get the IP addresses identified as belonging to a specific organisation from visitors.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • organisation_id (Integer)

    Id for specific organisation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OrganisationIpList, Integer, Hash)>)

    OrganisationIpList data, response status code and response headers



12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12595

def sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get_with_http_info(site_id, organisation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get"
  end
  # verify the required parameter 'organisation_id' is set
  if @api_client.config.client_side_validation && organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'organisation_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/organisations/{organisation_id}/ip_addresses'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'organisation_id' + '}', CGI.escape(organisation_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OrganisationIpList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_organisations_organisation_id_ip_addresses_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_organisations_organisation_id_pages_get(site_id, organisation_id, opts = {}) ⇒ OrganisationPageList

Get the pages visited by a specific organisation from visitors All pages visited by a specific organisation.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • organisation_id (Integer)

    Id for specific organisation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12677
12678
12679
12680
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12677

def sites_site_id_analytics_visitors_organisations_organisation_id_pages_get(site_id, organisation_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_organisations_organisation_id_pages_get_with_http_info(site_id, organisation_id, opts)
  data
end

#sites_site_id_analytics_visitors_organisations_organisation_id_pages_get_with_http_info(site_id, organisation_id, opts = {}) ⇒ Array<(OrganisationPageList, Integer, Hash)>

Get the pages visited by a specific organisation from visitors All pages visited by a specific organisation.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • organisation_id (Integer)

    Id for specific organisation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(OrganisationPageList, Integer, Hash)>)

    OrganisationPageList data, response status code and response headers



12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12694

def sites_site_id_analytics_visitors_organisations_organisation_id_pages_get_with_http_info(site_id, organisation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get"
  end
  # verify the required parameter 'organisation_id' is set
  if @api_client.config.client_side_validation && organisation_id.nil?
    fail ArgumentError, "Missing the required parameter 'organisation_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/organisations/{organisation_id}/pages'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s)).sub('{' + 'organisation_id' + '}', CGI.escape(organisation_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OrganisationPageList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_organisations_organisation_id_pages_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_organisations_organisation_id_pages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sites_site_id_analytics_visitors_screen_resolutions_get(site_id, opts = {}) ⇒ ResolutionList

Get screen resolutions from visitors Get a list of screen resolutions that visitors are using.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:



12775
12776
12777
12778
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12775

def sites_site_id_analytics_visitors_screen_resolutions_get(site_id, opts = {})
  data, _status_code, _headers = sites_site_id_analytics_visitors_screen_resolutions_get_with_http_info(site_id, opts)
  data
end

#sites_site_id_analytics_visitors_screen_resolutions_get_with_http_info(site_id, opts = {}) ⇒ Array<(ResolutionList, Integer, Hash)>

Get screen resolutions from visitors Get a list of screen resolutions that visitors are using.

Parameters:

  • site_id (Integer)

    Id for specific site.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter_id (Integer)

    Id for specific filter.

  • :group_id (Integer)

    Id for specific group.

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_id (Integer)

    Id for specific page.

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :period (String)

    Period for which to retrieve data. Default is last 7 days. A period can be a single date, a date range, or a predefined interval. Only full dates are allowed, not individual hours. Dates are in YYYYMMDD format only. A single date YYYYMMDD will return data for that day. A range of dates YYYYMMDD_YYYYMMDD will retrieve data for the period where the start and end date are both fully included. A predefined interval can be one of the following (case insensitive): now today yesterday last_seven_days last_week last_month this_month this_year

Returns:

  • (Array<(ResolutionList, Integer, Hash)>)

    ResolutionList data, response status code and response headers



12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
# File 'lib/siteimprove_api_client/api/analytics_api.rb', line 12791

def sites_site_id_analytics_visitors_screen_resolutions_get_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AnalyticsApi.sites_site_id_analytics_visitors_screen_resolutions_get ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling AnalyticsApi.sites_site_id_analytics_visitors_screen_resolutions_get"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_screen_resolutions_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_screen_resolutions_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AnalyticsApi.sites_site_id_analytics_visitors_screen_resolutions_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/sites/{site_id}/analytics/visitors/screen_resolutions'.sub('{' + 'site_id' + '}', CGI.escape(site_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_id'] = opts[:'page_id'] if !opts[:'page_id'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ResolutionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"AnalyticsApi.sites_site_id_analytics_visitors_screen_resolutions_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#sites_site_id_analytics_visitors_screen_resolutions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end