ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - programmerr47/ganalytics: Analytics library preferably sharpened for Google Analytics
Analytics library preferably sharpened for Google Analytics - programmerr47/ganalytics
Visit Site

GitHub - programmerr47/ganalytics: Analytics library preferably sharpened for Google Analytics

GitHub - programmerr47/ganalytics: Analytics library preferably sharpened for Google Analytics

Overview

Download

Ganalytics is tiny api layer for any analytics in application. It provides an object oriented, typesafe, strict and testable way to organize work with analytics in the application. More information on wiki pages.

Here is latest changelog.

Also, you can read these articles for more details:

  1. Introduction to conception
  2. V1.1 Changelog details

Get library

With gradle:

compile 'com.github.programmerr47:ganalytics-core:1.1.0'

With maven:

<dependency>
  <groupId>com.github.programmerr47</groupId>
  <artifactId>ganalytics-core</artifactId>
  <version>1.1.0</version>
  <type>pom</type>
</dependency>

Basic Usage

To start with gathering analytics:

  1. Create an group or category interface and fill it with necessary annotations:
@Prefix
interface CategoryInterface {
    fun action()
    @NoPrefix fun otherAction(@Label(LabelConverter::class) String label)
}

or

interface GroupInterface {
    @Prefix fun category(): CategoryInterface
    @Convention(NamingConventions.LOWER_CAMEL_CASE) fun otherCategory(): OtherCategoryInterface
}

For more information about interfaces and annotations read linked sections.

  1. Prepare Ganalytics instance through:

For group interfaces:

val ganalytics = Ganalytics({ System.out.println(it) /**or do something with received incoming events**/ }) {
     cutOffAnalyticsClassPrefix = false
     prefixSplitter = "_"
     namingConvention = NamingConventions.LOWER_SNAKE_CASE
     labelTypeConverters += TypeConverterPair<DummyDataClass> { it.name } +
             TypeConverterPair<DummyReversedClass> { it.id.toString() } 
}

wich is equal to:

val ganalytics = GanalyticsSettings {
    cutOffAnalyticsClassPrefix = false
    prefixSplitter = "_"
    namingConvention = NamingConventions.LOWER_SNAKE_CASE
    labelTypeConverters += TypeConverterPair<DummyDataClass> { it.name } +
            TypeConverterPair<DummyReversedClass> { it.id.toString() }
}.createGroup { System.out.println(it) /**or do something with received incoming events**/ }

For category interfaces:

val ganalytics = GanalyticsSettings {
    cutOffAnalyticsClassPrefix = false
    prefixSplitter = "_"
    namingConvention = NamingConventions.LOWER_SNAKE_CASE
    labelTypeConverters += TypeConverterPair<DummyDataClass> { it.name } +
            TypeConverterPair<DummyReversedClass> { it.id.toString() }
}.createSingle { System.out.println(it) /** or do something with received incoming events**/ }
  1. Pass an interface class to ganalytics:

val analytics = ganalytics.create(GroupInterface::class)

  1. Now you can use analytics. For example:

analytics.category().otherAction("label")

will print to the standart output: Event(category=sampleinterface, action=sampleinterface_method1)

Note: instead of System.out.println you can pass, for example:

googleAnalyticsTracker.send(HitBuilders.EventBuilder()
        .setCategory(it.category)
        .setAction(it.action)
        .setLabel(it.label)
        .setValue(it.value)
        .build())

Or any analytics method as you want.

For more info of basic usage see samples folder in project. Also please visit the wiki pages to know more details.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory