Add analytics to your Unity games and apps with the Snowplow event tracker for Unity.
With this tracker you can collect event data from your Unity-based applications, games or frameworks.
- SnowplowTracker requires Unity 2018.1+ and .NET Standard 2.0 Api Compatibility Level.
- SnowplowTracker requires Newtonsoft.Json. This is bundled with Unity 2020.1+ or Newtonsoft.Json-for-Unity can be used for earlier versions.
- SnowplowTracker supports both Mono and IL2CPP scripting backends.
- SnowplowTracker.Demo and SnowplowTracker.Tests are Unity 2021.3.12f1 (LTS) projects.
- Download the
unitypackage
from GitHub Releases. Drop into your Unity Editor. - If Newtonsoft.Json.dll isn't available, install Newtonsoft.Json-for-Unity.
Technical Docs | Setup Guide | Roadmap | Contributing |
---|---|---|---|
Technical Docs | Setup Guide | Roadmap | Contributing |
Assuming git, Vagrant and VirtualBox installed:
host$ git clone https://github.com/snowplow/snowplow-unity-tracker.git
host$ cd snowplow-unity-tracker
To work on the Tracker:
- Open the following file in your IDE of choice (Visual Studio, Visual Studio for Mac or JetBrains Rider):
snowplow-unity-tracker/SnowplowTracker/SnowplowTracker.sln
- This solution file will open the
SnowplowTracker
library in your editor. - Build files will output to bin/Debug or bin/Release depending on your configuration.
- Built DLLs will also be copied on successful builds to the Demo and Test projects Assets folders.
host$ vagrant up && vagrant ssh
guest$ cd /vagrant
guest$ mb &
guest$ curl -X POST -d @/vagrant/Resources/imposter.json http://localhost:2525/imposters
The test collector to use: http://localhost:4545
Now open Mountebank in your browser (on host is fine):
Requires: Unity 2021.3.12f1 (LTS)
- Open
snowplow-unity-tracker/SnowplowTracker.Tests
in the Unity Editor - Build the SnowplowTracker solution (desribed above) if you have made any changes to the Tracker. This will copy the DLLs to Demo and Tests asset folders.
- Ensure the Mountebank Test Collector is up and running (desribed above)
- Open the Test Runner
Window
->General
->Test Runner
and openEditMode
- Click
Run All
to run all tests
Please note that all Unit Tests are written with NUnit.
Requires: Unity 2021.3.12f1 (LTS)
To open the Demo Game simply add the following folder within Unity Hub, snowplow-unity-tracker/SnowplowTracker.Demo
, you can then build and run it yourself.
Tested Platforms:
- Windows
- Mac OSX
- Linux
- iOS
- Android
The Snowplow Unity Tracker is copyright 2015-2023 Snowplow Analytics Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.