Up to date
This page is up to date for Godot 4.3
.
If you still find outdated information, please open an issue.
POGRClient¶
Inherits: BlaziumClient < Node < Object
Node for connecting to the POGR analytics service.
Description¶
The POGRClient node provides an interface for connecting to the POGR analytics service. Find out more on the pogr.gg website.
The normal flow is as follows:
Initiate a session using init method.
Send data using data, event, logs, metrics and monitor methods, depending on use case.
Close the session using end method at the end of the game.
Note: All methods are non blocking and can be awaited in order to get the result.
For tags parameter, valid tags are:
var valid_tags = ["steam_id", "twitch_id", "association_id", "pogr_game_session", "xbox_id", "battlenet_id", "twitter_id", "linkedin_id", "pogr_player_id", "discord_id", "override_timestamp"]
Properties¶
|
||
|
Methods¶
data(tags: Dictionary, data: Dictionary) |
|
end() |
|
event(event_name: String, sub_event: String, event_key: String, flag: String, type: String = "user-event", tags: Dictionary = {}, data: Dictionary = {}) |
|
get_pogr_url() const |
|
logs(log: String, severity: String = "info", environment: String = "dev", service: String = "gameclient", type: String = "user-event", tags: Dictionary = {}, data: Dictionary = {}) |
|
metrics(metrics: Dictionary, environment: String = "dev", service: String = "gameclient", tags: Dictionary = {}) |
|
monitor(settings: Dictionary) |
Signals¶
log_updated(command: String, logs: String) 🔗
Signals a log from a command.
Property Descriptions¶
The build ID obtained from the pogr Game Client page.
The client ID obtained from the pogr Game Client page.
Method Descriptions¶
POGRResponse data(tags: Dictionary, data: Dictionary) 🔗
Send unstructured data. Call init first.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await data({"custom_data": "my_data"}).finished
if res.has_error():
print(res.error)
POGRResponse end() 🔗
Send end request. Call init first.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await end().finished
if res.has_error():
print(res.error)
POGRResponse event(event_name: String, sub_event: String, event_key: String, flag: String, type: String = "user-event", tags: Dictionary = {}, data: Dictionary = {}) 🔗
Send event with unstructured data. Call init first.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await event("combat", "enemy_killed", "attack", "completed", "user-event").finished
if res.has_error():
print(res.error)
Get the pogr url.
Get the session id. This is a unique identifier for the current session generated after init is called.
POGRResponse init(association_id: String) 🔗
Send init request. Needs to be called first. Needs to have set before client_id and build_id.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await init().finished
if res.has_error():
print(res.error)
POGRResponse logs(log: String, severity: String = "info", environment: String = "dev", service: String = "gameclient", type: String = "user-event", tags: Dictionary = {}, data: Dictionary = {}) 🔗
Add logs to the analytics. Call init first.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await logs("logs 123").finished
if res.has_error():
print(res.error)
POGRResponse metrics(metrics: Dictionary, environment: String = "dev", service: String = "gameclient", tags: Dictionary = {}) 🔗
Add metrics to the analytics. Call init first.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await metrics({"FPS": Engine.get_frames_per_second()}).finished
if res.has_error():
print(res.error)
POGRResponse monitor(settings: Dictionary) 🔗
Send monitor request.
Returns a POGRResponse object that has a POGRResponse.finished signal that is emitted when finished.
var res :POGRResult = await monitor({"my_setting": "test"}).finished
if res.has_error():
print(res.error)