Skip to content

Telemetry

Francisco Dias edited this page Dec 17, 2024 · 2 revisions

Telemetry

This is a module for handling telemetry.

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

GOG_Telemetry_AddArrayParam

This function adds an array parameter to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_AddArrayParam(name)
Argument Type Description
name String The name of the parameter



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_AddBoolParam

This function adds a boolean parameter to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_AddBoolParam(name, value)
Argument Type Description
name String The name of the parameter or empty string when adding a value to an array.
value Boolean The value of the parameter.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_AddFloatParam

This function adds a float parameter to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_AddFloatParam(name, value)
Argument Type Description
name String The name of the parameter or empty string when adding a value to an array.
value Real The value of the parameter.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_AddIntParam

This function adds an integer parameter to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_AddIntParam(name, value)
Argument Type Description
name String The name of the parameter or empty string when adding a value to an array.
value Real The value of the parameter.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name) ;
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_AddObjectParam

This function adds an object parameter to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_AddObjectParam(name)
Argument Type Description
name String The name of the parameter or empty string when adding a value to an array.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_AddStringParam

This function adds a string parameter to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_AddStringParam(name, value)
Argument Type Description
name String The name of the parameter or empty string when adding a value to an array.
value String The value of the parameter.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_ClearParams

This function clears all parameters that may have been set so far at any level.


Syntax:

GOG_Telemetry_ClearParams()



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_CloseParam

This function closes an object or array parameter and leaves its scope.


Syntax:

GOG_Telemetry_CloseParam()



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_GetVisitID

This function retrieves the current VisitID.

Note

Visit ID is used to link subsequent telemetry events that corresponds to the same action (e.g. game session).


Syntax:

GOG_Telemetry_GetVisitID()



Returns:

String


Example:

var _VisitID = GOG_Telemetry_GetVisitID();

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_ResetVisitID

This function resets the current VisitID.

ℹ️ NOTE

The visit ID is used to link subsequent telemetry events that correspond to the same action (e.g. game session).


Syntax:

GOG_Telemetry_ResetVisitID()



Returns:

N/A


Example:

GOG_Telemetry_ResetVisitID();

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_SendAnonymousTelemetryEvent

This function sends an anonymous telemetry event.


Syntax:

GOG_Telemetry_SendAnonymousTelemetryEvent(eventType)
Argument Type Description
eventType String The type of the event.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendAnonymousTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_SendTelemetryEvent

This function sends a telemetry event.


Syntax:

GOG_Telemetry_SendTelemetryEvent(eventType)
Argument Type Description
eventType String The type of the event.



Returns:

N/A


Example:

GOG_Telemetry_ClearParams();
GOG_Telemetry_AddStringParam("hello", "world");

GOG_Telemetry_AddArrayParam (name);
GOG_Telemetry_AddIntParam("int", 123);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_AddObjectParam(name);
GOG_Telemetry_AddBoolParam("bool", true);
GOG_Telemetry_AddFloatParam("float", 987.765);
GOG_Telemetry_CloseParam();

GOG_Telemetry_SendTelemetryEvent(eventType);

The code above provides a simple usage example.




Back To Top

GOG_Telemetry_SetSamplingClass

This function sets a sampling class to be applied next time you call GOG_Telemetry_SendTelemetryEvent or GOG_Telemetry_SendAnonymousTelemetryEvent.


Syntax:

GOG_Telemetry_SetSamplingClass(name)
Argument Type Description
name String The name of the sampling class.



Returns:

N/A


Example:

GOG_Telemetry_SetSamplingClass(name);

The code above provides a simple usage example.