unreal.AnalyticsLibrary

class unreal.AnalyticsLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Analytics Blueprint Library

C++ Source:

  • Plugin: AnalyticsBlueprintLibrary

  • Module: AnalyticsBlueprintLibrary

  • File: AnalyticsBlueprintLibrary.h

classmethod end_session()None

Ends an analytics session

classmethod flush_events()None

Requests that any cached events be sent immediately

classmethod get_session_id()str

Gets the current session id from the analytics provider

Returns

Return type

str

classmethod get_user_id()str

Gets the current user id from the analytics provider

Returns

Return type

str

classmethod make_event_attribute(attribute_name, attribute_value)AnalyticsEventAttr

Builds a struct from the attribute name and value

Parameters
  • attribute_name (str) –

  • attribute_value (str) –

Returns

Return type

AnalyticsEventAttr

classmethod record_currency_given(game_currency_type, game_currency_amount)None

Records an in-game currency was granted by the game with no real-world money being involved

Parameters
  • game_currency_type (str) –

  • game_currency_amount (int32) –

classmethod record_currency_given_with_attributes(game_currency_type, game_currency_amount, attributes)None

Records an in-game currency was granted by the game with no real-world money being involved

Parameters
classmethod record_currency_purchase(game_currency_type, game_currency_amount, real_currency_type, real_money_cost, payment_provider)None

Records an in-game currency was purchased using real-world money

Parameters
  • game_currency_type (str) –

  • game_currency_amount (int32) –

  • real_currency_type (str) –

  • real_money_cost (float) –

  • payment_provider (str) –

classmethod record_error(error)None

Records an error event has happened

Parameters

error (str) –

classmethod record_error_with_attributes(error, attributes)None

Records an error event has happened with attributes

Parameters
classmethod record_event(event_name)None

Records an event has happened by name without any attributes (an event counter)

Parameters

event_name (str) –

classmethod record_event_with_attribute(event_name, attribute_name, attribute_value)None

Records an event has happened by name with a single attribute

Parameters
  • event_name (str) –

  • attribute_name (str) –

  • attribute_value (str) –

classmethod record_event_with_attributes(event_name, attributes)None

Records an event has happened by name with a single attribute

Parameters
classmethod record_item_purchase(item_id, currency, per_item_cost, item_quantity)None

Records an in-game item was purchased using the specified in-game currency

Parameters
  • item_id (str) –

  • currency (str) –

  • per_item_cost (int32) –

  • item_quantity (int32) –

classmethod record_progress(progress_type, progress_name)None

Records a user progress event has happened

Parameters
  • progress_type (str) –

  • progress_name (str) –

classmethod record_progress_with_attributes(progress_type, progress_name, attributes)None

Records a user progress event has happened with attributes

Parameters
classmethod record_progress_with_full_hierarchy_and_attributes(progress_type, progress_names, attributes)None

Records a user progress event has happened with a full list of progress hierarchy names and with attributes

Parameters
classmethod record_simple_currency_purchase(game_currency_type, game_currency_amount)None

Records an in-game currency was purchased using real-world money

Parameters
  • game_currency_type (str) –

  • game_currency_amount (int32) –

classmethod record_simple_currency_purchase_with_attributes(game_currency_type, game_currency_amount, attributes)None

Records an in-game currency was purchased using real-world money

Parameters
classmethod record_simple_item_purchase(item_id, item_quantity)None

Records an in-game item was purchased

Parameters
  • item_id (str) –

  • item_quantity (int32) –

classmethod record_simple_item_purchase_with_attributes(item_id, item_quantity, attributes)None

Records an in-game item was purchased with attributes

Parameters
classmethod set_age(age)None

Sets the user’s age (if supported) on the analytics provider

Parameters

age (int32) –

classmethod set_build_info(build_info)None

Sets the game’s build info (if supported) on the analytics provider

Parameters

build_info (str) –

classmethod set_gender(gender)None

Sets the user’s gender (if supported) on the analytics provider

Parameters

gender (str) –

classmethod set_location(location)None

Sets the user’s location (if supported) on the analytics provider

Parameters

location (str) –

classmethod set_session_id(session_id)None

Sets the session id (if supported) on the analytics provider

Parameters

session_id (str) –

classmethod set_user_id(user_id)None

Sets the user id (if supported) on the analytics provider

Parameters

user_id (str) –

classmethod start_session()bool

Starts an analytics session without any custom attributes specified

Returns

Return type

bool

classmethod start_session_with_attributes(attributes)bool

Starts an analytics session with custom attributes specified

Parameters

attributes (Array(AnalyticsEventAttr)) –

Returns

Return type

bool