fpiesche / ga4unity Goto Github PK
View Code? Open in Web Editor NEWGoogle Analytics for Unity 3D
License: Other
Google Analytics for Unity 3D
License: Other
# Google Analytics for Unity3D, 2012 Florian Piesche / [email protected] / @ektoutie CAVEAT: This will only work on its own for native builds. For Web Player builds, you will need to add Google Analytics' ga.js to the page the game is embedded in. USAGE: drop in your assets folder. Attach to any GameObject as a Component. Call SetID method with your GA Tracking ID (UA-12345678-9) and the domain DeviceName you're using in GA. From then on, just call either of the two methods to log info/events to Google Analytics. METHODS: SetID(TrackingID as string, Domain as string), returns boolean Sets tracking up with your Google Analytics tracking ID (which you can find in your GA account) and the domain name to log things for. Returns false if there is no internet connection available (and thus tracking won't work). LogInfo(Prefix as string) logs system info (OS, Device Name, Device Type) as events with category Prefix. Prefix should be your game title or some other easily recognisable tag. LogEvent(EventCat as string, Event as string, EventLabel as string, EventValue as single) logs an event to Google Analytics with the custom text/value as above. Example: LogEvent("MyGameTitle", "StartLevel", "Level1", 1) to log the first attempt at starting Level 1 of your game. LogEvent("MyGameTitle", "PlayerDeath", "Orc", 42.3) to log a player's death to an Orc after 42.3 seconds of gameplay. EXAMPLES: self.gaScript.SetID("UA-12345678-9", "mydomain.com") self.gaScript.LogInfo("myGame") self.gaScript.LogEvent("myGame", "startLevel", "2", 0.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.