Google Analytics Measurement Protocol 1.1.2
Google Analytics plugin for Unreal Engine, using a native cross-platform implementation of the Measurement Protocol.
|
Google Analytics Measurement Protocol static methods that can be called from both Blueprint and C++. More...
#include <GAMPStatics.h>
Static Public Member Functions | |
static void | EndSession (const TMap< FString, FString > &Attributes) |
Ends a user session. More... | |
static class UGoogleAnalyticsMPAttributesFilter * | GetAttributesFilter () |
Get the Attributes Filter instantiated internally (. More... | |
static bool | GetOptOut () |
Get the status of the "opt out" option. More... | |
static void | RecordNamedEvent (const FString &EventName, const TMap< FString, FString > &Attributes) |
Records an "event" hit type (low level interface). More... | |
static void | RecordPurchase (const FGoogleAnalyticsMPPurchaseInfo &PurchaseInfo) |
Records a "transaction" hit type. More... | |
static void | RecordScreenView (const FString &ScreenName, const TMap< FString, FString > &Attributes) |
Records a "screenview" hit type to log how the user is moving inside your game/application. More... | |
static void | RecordStructuredEvent (const FString &EventCategory, const FString &EventAction, const FString &EventLabel, const int32 EventValue, const TMap< FString, FString > &Attributes) |
Records an "event" hit type. More... | |
static void | RecordStructuredEvent (const FString &EventCategory, const FString &EventAction, const FString &EventLabel, const TMap< FString, FString > &Attributes) |
Records an "event" hit type. More... | |
static void | RecordStructuredEventWithValue (const FString &EventCategory, const FString &EventAction, const FString &EventLabel, const int32 EventValue, const TMap< FString, FString > &Attributes) |
Records an "event" hit type (with an associated value). More... | |
static void | ResetPersistentData () |
Reset any persistent and cached data. More... | |
static void | SetOptOut (bool bOptOut) |
Set if "opt-out" from all analytics logging. More... | |
static void | SetUserID (const FString &UserID) |
Set the know unique identifier of the current user. More... | |
static void | StartSession (const TMap< FString, FString > &Attributes) |
Start a user session. More... | |
Friends | |
class | IGoogleAnalyticsMPProvider |
Google Analytics Measurement Protocol static methods that can be called from both Blueprint and C++.
This class provides the plugin API, including methods for ordinary event logging and methods to manage advanced features like session handling, opt-out, cached storage, etc.
|
static |
Ends a user session.
If UGoogleAnalyticsMPSettings::bAutoSessionHandling is false, you must call this method when your application ends.
|
static |
Get the Attributes Filter instantiated internally (.
|
static |
Get the status of the "opt out" option.
|
static |
Records an "event" hit type (low level interface).
EventName | Event name. |
Attributes | Optional auxiliary Google Analytics Measurement Protocol attributes (see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters). |
|
static |
Records a "transaction" hit type.
Transactions are purchase of items with real money.
PurchaseInfo | The purchase information about the transaction. |
|
static |
Records a "screenview" hit type to log how the user is moving inside your game/application.
In Unreal Engine, you can use it to track the user navigation between menus and maps.
ScreenName | The screen name as logged in Google Analytics. |
Attributes | Optional auxiliary Google Analytics Measurement Protocol attributes (see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters). |
|
inlinestatic |
Records an "event" hit type.
Events are user interactions with content other than screen views.
Read more about Google Analytics events here: https://support.google.com/analytics/answer/1033068?hl=en. To add further custom data to events, read about the Custom Dimensions and Metrics: https://support.google.com/analytics/answer/2709828?hl=en.
If you must log an event with a numeric value associated, you can use RecordStructuredEventWithValue().
EventCategory | Event category (required, it must not be empty). |
EventAction | Event action (required, it must not be empty). |
EventLabel | Event label (optional, can be empty). |
EventValue | Event value (required, use the other RecordEvent* methods if the value must not be logged). |
Attributes | Optional auxiliary Google Analytics Measurement Protocol attributes (see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters). |
|
inlinestatic |
Records an "event" hit type.
Events are user interactions with content other than screen views.
Read more about Google Analytics events here: https://support.google.com/analytics/answer/1033068?hl=en.
EventCategory | Event category (required, it must not be empty). |
EventAction | Event action (required, it must not be empty). |
EventLabel | Event label (optional, can be empty). |
Attributes | Optional auxiliary Google Analytics Measurement Protocol attributes (see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters). |
|
inlinestatic |
Records an "event" hit type (with an associated value).
Events are user interactions with content other than screen views.
Read more about Google Analytics events here: https://support.google.com/analytics/answer/1033068?hl=en. To add further custom data to events, read about the Custom Dimensions and Metrics: https://support.google.com/analytics/answer/2709828?hl=en.
EventCategory | Event category (required, it must not be empty). |
EventAction | Event action (required, it must not be empty). |
EventLabel | Event label (optional, can be empty). |
EventValue | Event value (required, use the other RecordEvent* methods if the value must not be logged). |
Attributes | Optional auxiliary Google Analytics Measurement Protocol attributes (see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters). |
|
static |
Reset any persistent and cached data.
Call this method to remove any stored data and reset the system to a clean and fresh state. This includes resetting the "opt-out" option (see SetOptOut()), any cached User ID and Client ID, etc.
|
static |
Set if "opt-out" from all analytics logging.
This is a "kill switch" method that can be used to silently ignore all calls made to log events on Google Analytics. It's useful if you want to provide to the user a simple option to opt-out from the analytics. The value is saved in the persistent storage. The default initial value is set in the project settings (see UGoogleAnalyticsMPSettings::bOptOutDefault).
bOptOut | Set to true to stop sending data to Google Analytics. |
|
static |
Set the know unique identifier of the current user.
The value is saved in the persistent storage accordingly to the setting UGoogleAnalyticsMPSettings::bPersistentUserID.
UserID | The known identifier for a user, or an empty string to clear it. It must not itself be PII (Personally Identifiable Information). If you have only PII (e.g. the user email address), we suggest to pass a proper hash string of it. |
|
static |
Start a user session.
If UGoogleAnalyticsMPSettings::bAutoSessionHandling is false, you must call this method when your application starts.