Giter Site home page Giter Site logo

pebosi / titanium-firebase-analytics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hansemannn/titanium-firebase-analytics

0.0 2.0 0.0 11.78 MB

Use the Firebase Analytics SDK in Axway Titanium ๐Ÿš€

License: Other

Java 1.08% JavaScript 0.34% Objective-C 68.70% Python 4.57% C 25.31%

titanium-firebase-analytics's Introduction

Firebase Analytics - Titanium Module

Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.

Requirements

  • Titanium SDK 6.2.0 or later

Android Note

When being using used together with other modules that use the Google Play Services (e.g. Ti.Map or Ti.Admob) you have to use at least Titanium SDK 7.0.0 for Android which resolved duplicate dependencies for you.

Latest module versions that support 7.0.0 and have Ti.PlayServices included:

Download

API's

FirebaseAnalytics

Methods

log(name, parameters)
  • name (String)
  • parameters (Dictionary)
setUserPropertyString(parameters)
  • parameters (Dictionary)
    • value (String)
    • name (String)
setScreenNameAndScreenClass(parameters) (iOS-only)
  • parameters (Dictionary)
    • screenName (String)
    • screenClass (String)

Properties

appInstanceID (String, get, iOS-only)
userID (String, set, iOS-only)
enabled (Boolean, set, iOS-only)

Example

// Require the Firebase Core module (own project!)
var FirebaseCore = require('firebase.core');

// Require the Firebase Analytics module
var FirebaseAnalytics = require('firebase.analytics');

// Configure Firebase
FirebaseCore.configure();

// Get the App Instance ID
Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);

// Log to the Firebase console
FirebaseAnalytics.log('My Event', { /* Optional arguments */ });

// Set user-property string
FirebaseAnalytics.setUserPropertyString({
  name: 'My Name'
  value: 'My Value'
});

// Set User-ID
FirebaseAnalytics.userID = 'MyUserID';

// Set screen-name  and screen-class
FirebaseAnalytics.setScreenNameAndScreenClass({
  screenName: 'ScreenName',
  screenClass: 'ScreenClass'
});

// Toogle analytics on/off (default: on / true)
FirebaseAnalytics.enabled = false;

Build

cd ios
appc ti build -p ios --build-only

Legal

This module is Copyright (c) 2017-Present by Appcelerator, Inc. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.

titanium-firebase-analytics's People

Contributors

hansemannn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.