Version 1.0.0
7 downloads
This plugin is an re-write of the free Google Analytics plugin on uMod (https://umod.org/plugins/analytics) that works with GA4.
Works with Google Analytics 4
Developer API for use in other plugins
Event queueing system to prevent rate-limiting
Fast and performant
{
"Debug": false, // Enables debug logging in the console.
"Measurement ID": "", // The measurement ID in your GA dashboard.
"API Secret": "", // Your API Secret from your GA dashboard.
"Client ID": "My Rust Server", // The server identifier in the events.
"Send Data Interval": 3.0, // How often queued events are processed.
"Analytics": {
"player_join": true,
"player_leave": true,
"player_pvp_death": true,
"player_chat": true,
"player_command": true,
"report_receive": true,
"player_buy_vending": true,
"player_kit_redeem": true
} // Enable and disable events (you can also add events from other plugins here). If an event isn't in this list, it will be enabled by default
}
Plugin developers can integrate events into their plugins using our API.
API Methods:
API_QueueAnalytic(Dictionary<string, Dictionary<string,object>> events, ulong? userId = null)
Example of queueing an event:
GAPlugin.Call("API_QueueAnalytic",
new Dictionary<string, Dictionary<string, object>>() // A list of events.
{
{
"kit_redeem", // The event name.
new Dictionary<string, object>() // Event parameters.
{
{ "kit_name", kitName }
}
}
},
userId // The user ID of a player (optional, should be set for events that involve a player).
);