NAV
C# (Unity) Java (Android) Objective-C (iOS)

PlaytestCloud Event Tracking SDK

Mark interesting points in your PlaytestCloud videos to find them more quickly during video playback

Event tracking in action

Add this SDK to your game to mark events that will show up next to your PlaytestCloud videos. It enables you to jump to interesting points in the video more quickly (e.g., level transitions or player deaths).

We currently offer the SDK for Unity and Android. It will only be active when a game is being tested on PlaytestCloud, otherwise it will just do nothing.

It offers only one method: TrackEvent lets you mark an event in the PlaytestCloud video recording. Add TrackEvent calls to interesting points of your gameplay and they will be marked in the video playback on PlaytestCloud.

Download & Installation

Unity

Download here: PlaytestCloudEventTracking-0.0.1.zip

Copy the PlaytestCloudEventTracking folder into the Assets folder of your Unity project.

Android

Download here: PlaytestCloudEventTrackingAndroid-0.0.1.zip

Copy the playtestcloud.jar library into the libs folder of your Android project. In Android studio, switch the Project View from Android to Project, right-click on the added library file and select Add as Library.... You now can use the PlaytestCloud event tracking throughout the module.

Usage

Track text-only event


// ...
PlaytestCloud.TrackEvent("♕ Won level 1. 9/100 moves used. Score: 9900");
import com.playtestcloud.Analytics;

// ...
Analytics.trackEvent("♕ Won level 1. 9/100 moves used. Score: 9900");
// ...
NSDictionary *userInfo = @{@"content": @"♕ Won level 1. 9/100 moves used. Score: 9900"};
[[NSNotificationCenter defaultCenter] postNotificationName:@"PTCEventTrackingNotification"
                                                    object:nil
                                                  userInfo:userInfo];

Simple, text-only event

To track a simple, text-only event, just call TrackEvent with a single string parameter. You can use Unicode characters.

Track complex event

// ...
PlaytestCloud.TrackEvent(new Dictionary<string, string> {
    { "event", "level_restarted" },
    { "level", "2" },
    { "jailbroken", "false" },
    { "coins", "70" }
});
import com.playtestcloud.Analytics;

// ...
Analytics.trackEvent("level_restarted", "level", "2", "jailbroken", "false", "coins", "70");

// or:
HashMap<String, String> map = new HashMap<>();
map.put("event", "level_restarted");
map.put("level", "2");
map.put("jailbroken", "false");
map.put("coins", "70");
Analytics.trackEvent(map);
//...
NSDictionary *userInfo = @{@"event": @"level_restarted",
                           @"level": @"2",
                           @"jailbroken": @"false",
                           @"coins": @"70"};
[[NSNotificationCenter defaultCenter] postNotificationName:@"PTCEventTrackingNotification"
                                                    object:nil
                                                  userInfo:userInfo];

Complex event

A complex event is a Dictionary of strings. You can use this to add parameters and additional metadata to the event.

FAQ

Can I leave the SDK in my code after I’m done testing on PlaytestCloud?

Yes you can. When your game is not currently in a playtest on PlaytestCloud, the events won’t be tracked. This means that there will be no superflous HTTP requests.

Do I need to remove the SDK when submitting my game to the App Store?

No. The SDK is App Store safe.

What happens when I track an event?

First, the SDK will check whether the game is currently tested on PlaytestCloud: It does so by trying to detect the PlaytestCloud video recording library that gets injected into your builds by us. If the library is found, it will call a method in this library that will POST the event to the servers on playtestcloud.com. If the library could not be found, it will do nothing.

I found a bug in the SDK

Please let us know about it at team@playtestcloud.com and we’ll try to fix it ASAP.

Can you support language x?

Probably. Please email us at team@playtestcloud.com and we’ll discuss the details.

Feedback & Support

Email us at team@playtestcloud.com with any questions or suggestions you might have.