Skip to content

Commit 645086d

Browse files
committed
Add additional default properties to help filter export and debug builds.
1 parent 32af8db commit 645086d

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,18 @@ If you'd like to use your own UI and manually handle consent management, you can
7171
### Customizing consent UI
7272
By default, the built-in consent UI will use whatever UI theme that has been set for your project. You can modify this by changing the properties of the ConsentDialog found in `/addons/quiver_analytics/consent_dialog.tscn`.
7373

74-
### Advanced Properties
74+
### Default Properties
75+
76+
The plugin will automatically add the following default properties to all events:
77+
78+
* "$platform": The platform the game is running on. Can be either "Windows", "macOS", "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD", "Android", "iOS", or "Web". Custom builds may yield other values.
79+
* "$session_id": The unique session identifier for this event. A session starts when the game launches and ends when the game is exited.
80+
* "$debug": Whether this event came from a debug build of the game. Both editor and debug versions of export templates will set debug to true. You can use this to filter out events created during development.
81+
* "$export_template": Whether this event came from a build using an export template, whether it is debug or release.
82+
83+
All default property names start with a "$".
84+
85+
### Advanced Settings
7586
If you turn on Advanced Settings for Project Settings -> Quiver -> Analytics, you'll find the following properties:
7687

7788
* "Config File Path": where the config file is stored, defaults to "user://analytics.cfg".

addons/quiver_analytics/analytics.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ func add_event(name: String, properties: Dictionary = {}) -> void:
178178
# Auto-add the platform
179179
properties["$platform"] = OS.get_name()
180180
properties["$session_id"] = session_id
181+
properties["$debug"] = OS.is_debug_build()
182+
properties["$export_template"] = OS.has_feature("template")
181183

182184
# Add the request to the queue and process the queue
183185
var request := {

addons/quiver_analytics/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="Quiver Analytics"
44
description="Get key insights into how players are interacting with your game while still respecting their privacy."
55
author="Quiver"
6-
version="0.2"
6+
version="0.3"
77
script="plugin.gd"

0 commit comments

Comments
 (0)