Custom Events

Custom Events are the primary way Cognitive3D collects telemetry data (user events) from your product.

They can be created with the code below. If a session is not yet active, the custom event will be recorded and sent after the session begins.

    //the position in the scene where this custom event happens
    std::vector<float> pos = { 0,0,0 };
    cog->GetCustomEvent()->RecordEvent("Toggle Music",pos);

    //custom events support arbitrary properties
    cognitive::nlohmann::json properties = cognitive::nlohmann::json();
    properties["volume"] = -21;
    cog->GetCustomEvent()->RecordEvent("Set Music Volume",pos,properties);