Skip to content

Amxx GameAnalytics SDK

Unofficial SDK for the gameanalytics.com analytics service. The service lets you track basic metrics such as DAU, MAU, Retention and others, and also collect statistics on your own events. The plugin sends session start and end events automatically. And through the API you can…

PluginCounter-Strike 1.6v0.1bViews:18

Description

Description:
Unofficial SDK for the analytics service gameanalytics.com.
The service lets you track basic metrics such as DAU, MAU, Retention and others, and also collect statistics on your own events.

The plugin sends session start and end events automatically. Through the API you can also send your own events, though the current beta version of the plugin only supports so-called design events. For example, if you run a mod server, the service can show which weapons are used most often or which items are bought most often.

Calling the API function when an item is bought in the shop may look like this:
game_analytics_custom_event(player_id, fmt("Shop:%s", item_name));
item_name - item name (without spaces or special characters)

Requirements:
AMXX 1.8.3 or higher

Required modules:
curl version 1.1.1
ncrypto version 1.0

Configuration:
All configuration is done in amxmodx/configs/ga_sdk_config.cfg

Api section:
Endpoint - the address analytics is sent to (you most likely won't need to change it);
GameKey - the game key, copy it from your personal account;
SecretKey - the secret key, copy it from your personal account.

Common section:
MinSessionLength - Minimum session length in seconds. If a client played for less than specified, their events will not be sent to the analytics service.

API:

native game_analytics_custom_event(const player_id, const event[], Float:...);
Sends an analytics event; the third parameter can be left out. More details in the documentation.

Important! If you plan to send events when a player disconnects, in client_disconnected, the gs_sdk.amxx plugin must be listed at the very bottom of plugins.ini.

Download:
GitHub
GitHub releases (compiled version)

Related

Pluginv1.8

Hats

AMX Mod X plugin for Counter-Strike. The plugin allows the player to wear hats on their heads. The main feature of this modification is the player's ability to choose a skin or a submodel of a headgear on his own and set which of them will be available exclusively to VIP players.

Pluginv0.3

Slot Machine

AMX Mod X plugin for Counter-Strike. The plugin allows you to place slot machines on the map and play them. The player places a bet and waits for a winning combination of symbols to appear. A victory is counted when a whole row or diagonal is filled with the same symbols.

Pluginv1.0

Costumes

This plugin adds costumes to your server; the models are compressed into one so as not to hit the server's limit. It can also be set up for ZombiePlague: to do so, uncomment the code // #define ZP_SUPPORT in the source and compile. Usage: /costumes - in chat to open the costumes menu…