Tiny tracking lib for Google Analytics.

Overview

Donation About Jan Rabe

BloodHoud Android Arsenal Javadoc Build Status API API API Gradle Version GitHub license Kotlin Android Studio Canary

Tiny library for tracking screens and events with google analytics and / or firebase analytics.

How to install

repositories {
    maven {
        url "https://jitpack.io"
    }
}
	
dependencies {
        implement 'com.github.kibotu:BloodHound:-SNAPSHOT'

        // for google analytics
        implement "com.google.android.gms:play-services-gcm:16.0.0"
        implement "com.google.android.gms:play-services-analytics:16.0.6"

        // for firebase
        implement "com.google.firebase:firebase-core:16.0.6"
}

How to use

Google Analytics

  1. Add gms version to manifest

     <application>
         <meta-data
             android:name="com.google.android.gms.version"
             android:value="@integer/google_play_services_version" />
     </application>
    
  2. Initialize

     BloodHound.with(context, "trackingId")
    
  3. Track Screens

     BloodHound.screen("main_screen")
    
  4. Track Events

    BloodHound.track("category", "action", "app_start",
         mapOf("user" to UUID.randomUUID().toString()) // (optional) parameters
    )
    
  5. (optional) Reset client

     BloodHound.reset()
    

Firebase

  1. Initialize

     BloodHound.with(context)
    
  2. Track Screens

     BloodHound.screen("main_screen")
    
     // with screen class
     // BloodHound.screen("main_screen", MainActivity::class.java.simpleName)
    
  3. Track Events

     BloodHound.track("main_screen", "user_event",
         mapOf("user" to UUID.randomUUID().toString()) // (optional) parameters
     )
    
  4. (optional) Reset client

     BloodHound.reset()
    

GoogleAnalyitcsOptions (defaults)

BloodHound.with(this, "trackingId", GoogleAnalyitcsOptions(
    enableDebugging = false,
    enableLogging = false,
    exceptionReporting = false,
    advertisingIdCollection = true,
    autoActivityTracking = false,
    sessionTimeout = 300,
    sampleRate = 100.0,
    sessionLimit = 500,
    dryRun = false,
    anonymizeIp = true
))

FirebaseOptions (defaults)

BloodHound.with(this, FirebaseOptions(
    enableDebugging = false,
    enableLogging = false
))

License

Copyright 2019 Jan Rabe

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

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.
You might also like...
Analytics for Trading with NOA

Analytics for Trading using NOA In this repository we present a few examples for trading analytics that leverage the nonlinear optimisation platform N

Data analytics app for mining

Vision Vision is a data analytics app developed to visualise and interact with m

Unified API Library for: Cloud Storage, Social Log-In, Social Interaction, Payment, Email, SMS, POIs, Video & Messaging. Included services are Dropbox, Google Drive, OneDrive, OneDrive for Business, Box, Egnyte, PayPal, Stripe,  Google Places, Foursquare, Yelp, YouTube, Vimeo, Twitch, Facebook Messenger, Telegram, Line, Viber, Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, Mailjet, Sendgrid, Twilio, Nexmo, Twizo. A tiny window overlay to log app internal on top of your android app
A tiny window overlay to log app internal on top of your android app

DebugOverlay A logcat alike overlay to display log messages in your app as independent overlay. Typically in android you would log some app internals

🎨 A tiny (Kotlin) library for generating attractive colors
🎨 A tiny (Kotlin) library for generating attractive colors

🎨 A tiny (Kotlin) library for generating attractive colors

A tiny Kotlin API for cheap logging on top of Android's normal Log class.
A tiny Kotlin API for cheap logging on top of Android's normal Log class.

A tiny Kotlin API for cheap logging on top of Android's normal Log class.

android-trinity is tiny proactive framework with much of the scaffolding code  required to start a new Android Application.
android-trinity is tiny proactive framework with much of the scaffolding code required to start a new Android Application.

android-trinity This is tiny framework with much of the scaffolding code (with some nice utilities and prepared source code) required to start a new A

Micro Template 📃 A very tiny and simple text templating library for Kotlin.

Micro Template 📃 A very tiny and simple text templating library for Kotlin. It has very limited features, so it's intended to be used for short templ

A tiny tool for syncing times between a local computer and android devices
A tiny tool for syncing times between a local computer and android devices

TimeSync A super tiny tool for syncing times between a local computer and android devices, through adb tool. Screen Shots It uses compose lib and Kotl

Android tiny device flow client

OAuth 2.0 Device Flow Example Setup Create an Auth0 application Enable Device Code Grants in Advanced settings Disable Client Credentials Enable Devic

A tiny framework to execute shell scripts on Android

Skippy A tiny framework to execute shell scripts on Android Why I first sought out to create a basic script manager for Android.

An Android library for scanning documents based on CameraX API and a tiny version of OpenCV

Document Scanner with tiny OpenCV example1.mp4 Document Scanner is an Android library (kotlin based) for scanning documents based on CameraX API and a

Tiny library to ease the use of environment variables with support for .env files

asimov/environment Tiny library to ease the use of environment variables with support for .env files. Installation Gradle (Kotlin) repositories {

Clipeus - Tiny app to clean clipboard
Clipeus - Tiny app to clean clipboard

Clipeus Clipboard cleaner. Tiny app to clean clipboard. No UI. Click on the app

Tiny app to change Wi-Fi state via broadcast
Tiny app to change Wi-Fi state via broadcast

WyFy Wi-Fi change state adapter. Tiny app to change Wi-Fi state via broadcast. Useful to bypass Google limitation on apps targeting API 29 and higher.

Tiny app to enforce security policies of your device
Tiny app to enforce security policies of your device

Sentry Enforce security policies. Tiny app to enforce security policies of your device. It can: limit the maximum number of failed password attempts d

HubSpot Kotlin SDK 🧺 Implementation of HubSpot API for Java/Kotlin in tiny SDK

HubSpot Kotlin SDK 🧺 Implementation of HubSpot API for Java/Kotlin in tiny SDK

A tiny Android app that can receive WhatsApp group message export files and parse message history stats.

A tiny Android app that can receive WhatsApp group message export files and parse message history stats.

A Kotlin binding to webview, a tiny cross-platform webview library, supports Java and Native.
A Kotlin binding to webview, a tiny cross-platform webview library, supports Java and Native.

webviewko provides a Kotlin/JVM and a Kotlin/Native(experimental) binding to webview, a tiny cross-platform webview library to build modern cross-platform GUIs using WebView2, WebKit and WebKitGTK.

Owner
Jan Rabe
Native Android / Unity Developer & Technocrat #kotlin #csharp #unity #opensource
Jan Rabe
Tiny tracking lib for Google Analytics.

BloodHoud Tiny library for tracking screens and events with google analytics and / or firebase analytics. How to install repositories { maven {

Jan Rabe 22 Oct 5, 2022
Gadget is a library that makes analytics tracking easier for android apps

gadget (In RC Stage) Gadget is a library that makes analytics tracking easier for android apps.

Taylan Sabırcan 54 Nov 29, 2022
A lightweight tracking framework based on the tracking idea of Buzzvideo.(基于西瓜视频的责任链埋点思路实现的轻量级埋点框架)

Tracker English | 中文 Tracker is a lightweight tracking framework based on the tracking idea of Buzzvideo. Tracking idea Why use chain of responsibilit

DylanCai 76 Dec 22, 2022
A highlight lib and also it can be a simple popup window lib for android

HighlightPro 中文 HighlightPro is a highlight library for android and also it can be a simple popup window library for android. Features: One or more hi

heyangyang 192 Jan 2, 2023
Based on Android + NodeMCU platform to achieve object detection and tracking, AI capabilities come from Google MLKit.

Based on Android + NodeMCU platform to achieve object detection and tracking, AI capabilities come from Google MLKit.

null 1 Apr 4, 2022
Countly Product Analytics Android SDK

Countly Android SDK We're hiring: Countly is looking for Android SDK developers, full stack devs, devops and growth hackers (remote work). Click this

Countly Team 648 Dec 23, 2022
Countly Product Analytics Android SDK

Countly Android SDK We're hiring: Countly is looking for Android SDK developers, full stack devs, devops and growth hackers (remote work). Click this

Countly Team 648 Dec 23, 2022
Countly Product Analytics Android SDK

Countly Android SDK We're hiring: Countly is looking for Android SDK developers, full stack devs, devops and growth hackers (remote work). Click this

Countly Team 648 Dec 23, 2022
Free forever Marketing SDK with a dashboard for in-app SplashScreen banners with built-in analytics

AdaptivePlus Android SDK AdaptivePlus is the control center for marketing campaigns in mobile applications Requirements minSdkVersion 16 Examples prov

Adaptive.Plus 16 Dec 14, 2021
Analytics Tools for Kotlin Multiplatform Mobile iOS and android

Index Features Example Introduce Architecture Installation Configure Using Screen Mapper Initialization Implementation Delegate Parameters ATEventPara

LINE 16 Dec 5, 2022