Skip to content

Snowplow event tracker for Unity. Forked due to a bug in WebGL version.

License

Notifications You must be signed in to change notification settings

Livit/snowplow-unity-tracker

 
 

Repository files navigation

Unity Analytics for Snowplow

early-release Build Release License

Overview

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.

Quick start

Requirements

  • 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.

Installation

Find out more

Technical Docs Setup Guide Roadmap Contributing
i1 i2 i3 i4
Technical Docs Setup Guide Roadmap Contributing

Maintainer Quick start

Building

Assuming git, Vagrant and VirtualBox installed:

 host$ git clone https://github.com/snowplow/snowplow-unity-tracker.git
 host$ cd snowplow-unity-tracker

Development

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.

Setting up a Test Endpoint

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):

Testing Framework

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 open EditMode
  • Click Run All to run all tests

Please note that all Unit Tests are written with NUnit.

Running the Snowplow Demo Game

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

Copyright and license

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.

About

Snowplow event tracker for Unity. Forked due to a bug in WebGL version.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.5%
  • Shell 0.5%