Skip to content

Real User Measurements API

Shane Barbetta edited this page Jul 25, 2018 · 5 revisions

Methods for web beacon administration and obtaining real user measurements.

Method summary

create()

  Create a new RUM beacon and return the jsTag

list()

  Return a list of all RUM beacons associated with the account

update()

  Updates preferences of an existing beacon

delete()

  Delete a beacon

data_summary()

  Recent RUM data aggregated into a summary

data_recent()

  Returns recently-aggregated minute-level RUM data

data_ts()

  Returns RUM time series data for a given period

data_raw()

  Returns samples of raw data collected for a given time period

data_analysis()

  Returns RUM raw data filtered by request params for a given time period

data_ol_ts

  Returns RUM object-level time series data for a given time period

data_ol_outlier()

  Returns grouped outlying page resources

create(string name)

Create a new RUM beacon and return the jsTag

Arguments:

  name - Name of the beacon

Example:

c.rum().create('My Beacon')

list()

Return a list of all RUM beacons associated with the account

Example:

c.rum().list()

update(**kwargs)

Updates preferences of an existing beacon

Keyword Arguments:

  name - Name of the beacon

  max_load_time - Maximum load time (ms) allowed per measurement

  sampling_rate - A number between 0 and 1 to represent sampling rate

Example:

c.rum().update(name='My Beacon', max_load_time=30000, sampling_rate=1)

delete()

Delete a beacon

Example:

c.rum('beacon_id').delete()

data_summary(**kwargs)

Recent RUM data aggregated into a summary

Keyword Arguments:

  minutes - Number of minutes (between 1 and 60) to aggregate (default is 5)

Example:

# Not supplying a beacon ID will return all beacons
c.rum('beacon_id').data_summary(minutes=20)

data_recent(**kwargs)

Returns recently-aggregated minute-level RUM data

Keyword Arguments:

  minutes - Number of minutes (between 1 and 60) to aggregate (default is 5)

Example:

c.rum('beacon_id').data_recent(minutes=20)

data_ts(string start, string end, **kwargs)

Returns RUM time series data for a given period

Arguments:

  start - Start date formatted in ISO 8601

  end - End date formatted in ISO 8601

Keyword Arguments:

  type - If 'daily' this will return day-level aggregated data, otherwise it's minute-level

Example:

c.rum('beacon_id').data_ts('2012-06-01T00:00:00Z', '2012-06-05T00:00:00Z', type='daily')

data_raw(string start, string end, **kwargs)

Returns samples of raw data collected for a given time period

Arguments:

  start - Start date formatted in ISO 8601

  end - End date formatted in ISO 8601

Keyword Arguments:

  offset - Position to start in the return list. Default is 0

  limit - Number of results to return. Default (and max) is 2000

  order_by - Set to 'asc' (ascending) or 'desc' (descending) to sort by load time

  errors_only - Set to 1 to only return JavaScript errors

  exact_url - Filter raw samples by exact url

  url - Filter raw samples by url using a regular expression

  browser - Filter raw samples by browser

    chrome

    firefox

    IE

    android

  connection_type - Filter raw samples by connection type

    ocx

    tx

    dsl

    cable

    isdn

    mobile wireless

  country - Filter raw samples by country

  jserr - Regex to filter raw samples by JS error filename or string

  ipr - Filter raw samples by IP reputation score

    1 - Very Low Risk

    2 - Low Risk

    3 - Moderate Risk

    4 - High Risk

    5 - Very High Risk

Example:

c.rum('beacon_id').data_raw('2012-06-01T00:00:00Z', '2012-06-05T00:00:00Z', offset=2001, limit=1000, order_by='asc', errors_only=1, browser='android')

data_analysis(string start, string end, **kwargs)

Returns RUM raw data filtered by request params for a given time period

Arguments:

  start - Start date formatted in ISO 8601

  end - End date formatted in ISO 8601

Keyword Arguments:

  group_by - Key to group by. Required if 'overtime' is not set to 1

  overtime - Set this flag to 1 if you want results to be returned over time

  url - Regex to filter samples by url

  browser - Filter samples by browser

    chrome

    firefox

    IE

    android

  connection_type - Filter samples by connection type

    ocx

    tx

    dsl

    cable

    isdn

    mobile wireless

  country - Filter samples by country

  jserr - Regex to filter samples by JS error filename or string

  ipr - Filter samples by IP reputation score

    1 - Very Low Risk

    2 - Low Risk

    3 - Moderate Risk

    4 - High Risk

    5 - Very High Risk

Example:

c.rum('beacon_id').data_analysis('2012-06-01T00:00:00Z', '2012-06-05T00:00:00Z', overtime=1, ipr=3)

data_ol_ts(string start, string end)

Returns RUM object-level time series data for a given time period

Arguments:

  start - Start date formatted in ISO 8601

  end - End date formatted in ISO 8601

Example:

c.rum('beacon_id').data_ol_ts('2012-06-01T00:00:00Z', '2012-06-05T00:00:00Z')

data_ol_outlier(string start, string end, string group_by)

Returns grouped outlying page resources

Arguments:

  start - Start date formatted in ISO 8601

  end - End date formatted in ISO 8601

  group_by - Key to group the data by

    resource

    domain

    location_resource

    location_domain

Example:

c.rum('beacon_id').data_ol_outlier('2012-06-01T00:00:00Z', '2012-06-05T00:00:00Z', 'domain')

Clone this wiki locally