Here is an extension with basic implementation of Tenjin SDK for Defold: https://github.com/MaratGilyazov/def_tenjin
I said “basic” because I’ve implemented only what I needed right now (and even more - I don’t really need custom events), not all available APIs.
if tenjin then
tenjin.init("YOUR_API_KEY", true)
tenjin.custom_event("custom_event")
tenjin.custom_event_with_value("custom_event", "10")
end
LUA Api
tenjin.init(string api_key, bool gdpr_consent)
Initializes Tenjin, call this before any other calls to Tenjin. This call is enough to track your installs.
- api_key - is your API_KEY from your Tenjin Organization tab
- gdpr_consent - boolean flag to forward your user’s consent regarding sensitive data; send true for “OptIn”, if permission are granted
tenjin.custom_event(string event_name)
Send custom event with event_name
tenjin.custom_event_with_value(string event_name, string event_value)
Send custom event with event_name and event_value. IMPORTANT! event_value should be send as a string BUT it should contain the integer value!
ATTENTION! Purchases tracking is not implemented!
Testing
See an official documentation describing how to test your integration: https://docs.tenjin.com/en/send-events/#check
Tested with Tenjin iOS SDK v1.9.1, under Mac Editor 1.2.165 on devices: iPhone XR, iPhone7.
If you need more native APIs supported - feel free to push your Pull Request