Add analytics to your Lua apps and Lua-scripted games with the Snowplow event tracker for Lua.
With this tracker you can collect event data from your Lua-based applications, Lua web servers/frameworks, or from the Lua scripting layer within your games or apps.
Ensure you have the following installed on your system:
If using brew
, simply run:
brew install lua luarocks curl
luarocks install snowplowtracker-0.2.0-1 --deps-only
Note: There are two path args you may need to pass in if luarocks cannot find them, CURL_DIR
, and UUID_DIR
.
An example if curl was installed via brew
, depending on your architecture:
luarocks install snowplowtracker-scm-1.rockspec --deps-only CURL_DIR=/usr/local/Cellar/curl/7.81.0
luarocks install snowplowtracker-scm-1.rockspec --deps-only CURL_DIR=/opt/homebrew/opt/curl
With all dependencies installed, run:
luarocks build
To run tests, you will need busted
:
luarocks install busted
These tests require a Snowplow collector, so there are a couple of ways you're able to run them:
This script will handle downloading and running Micro for the tests, you just need to run:
./run-tests
You are able to use any busted
arguments with this script, for example:
./run-tests --pattern=tracker_spec.lua
You are also able to run these tests with any collector by setting the MICRO_URL
envvar to the collector URL, and then running busted
:
set MICRO_URL=http://localhost:9090
busted
Luacheck, a static analyser, is used with this project. To check all files, first install luacheck:
luarocks install luacheck
Then run:
luacheck .
Snowplow Docs | Setup Guide | Contributing |
---|---|---|
Snowplow Docs | Setup Guide | Contributing |
Feedback and contributions are welcome - if you have identified a bug, please log an issue on this repo. For all other feedback, discussion or questions please open a thread on our Discourse forum.
The Snowplow Lua Tracker is copyright 2013 - 2022 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.