Custom Events

Custom Events are the primary way Cognitive3D collects telemetry data (user events) from your product. Thse were called Transactions in previous versions of the SDK.

Custom Events automatically record x,y,z coordinates. If the position is not provided, it will use the position of the HMD. This allows us to map every single Custom Event to a specific point in your VR experience. In conjunction with visual telemetry (gaze tracking), coordinates gives you the ability to map out how your users are interacting with your product at a 3d space.


Blueprints

You can use an array of AnalyticsEventAttr to add properties to a custom event.

simple events


C++

Custom Events can be created with the code below. You can create a FJsonObject to add properties to your custom events. Unlike AnalyticsEventAttr in Blueprints, this will correctly save the type of property - int, float, bool - instead of converting it to a string.

TSharedPtr<FAnalyticsProviderCognitiveVR> provider = FAnalyticsCognitiveVR::Get().GetCognitiveVRProvider();
provider->customevent->Send("Button Activated");
provider->customevent->Send("Button Activated",FVector(0,100,0));

TSharedPtr<FJsonObject> properties = MakeShareable(new FJsonObject());
properties->SetStringField("last login", FString("never"));
properties->SetNumberField("login attempts", 4);

provider->customevent->Send("Button Activated", properties);
provider->customevent->Send("Button Activated", FVector(0, 100, 0), properties);

provider->FlushEvents();