A lightweight tracking framework based on the tracking idea of Buzzvideo.(基于西瓜视频的责任链埋点思路实现的轻量级埋点框架)

Related tags

App Tracker
Overview

Tracker

English | 中文

Tracker is a lightweight tracking framework based on the tracking idea of Buzzvideo.

Tracking idea

Why use chain of responsibility tracking?

Gradle

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        // ...
        maven { url 'https://www.jitpack.io' }
    }
}

Add dependencies:

dependencies {
    implementation 'com.github.DylanCaiCoding:Tracker:1.0.1'
}

Usage

📝 >> Usage documentation <<

Sample

Set a trackNode for the Activity/Fragment/View to add tracking parameters.

trackNode = TrackNode("channel_name" to "recommend")
holder.itemView.trackNode = TrackNode("video_id" to item.id, "video_type" to item.type)

Set a referrer node and a page node to establish a chain of source responsibilities between activity.

val intent = Intent(activity, DetailsActivity::class.java).putReferrerTrackNode(view)
activity.startActivity(intent)
activity.trackNode = PageTrackNode("page_name" to "details")

This creates a chain of responsibility similar to the one below.

image

Then it can collect and post the parameters on the responsibility chain through any view.

view.postTrack("click_favorite")

This library has Kotlin and Java sample code for simulating Buzzvideo tracking requirements.

Change log

Releases

Author's other libraries

Library Description
Longan Probably the best Kotlin utils library for Android.
LoadingStateView Decoupling the code of toolbar or loading status view.
ViewBindingKTX The most comprehensive utils of ViewBinding.
MMKV-KTX Use MMKV with property delegates.

License

Copyright (C) 2022. Dylan Cai

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...
Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP).
Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP).

1time Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP). Maven / gradle de

weiV(pronounced the same as wave), a new declarative UI development framework based on the Android View system.

weiV(pronounced the same as wave) 简体中文 if ("weiV" == "View".reversed()) { Log.d( "weiV", "It means Inversion of Control, you shoul

FDPClient-EDITED - A free mixin-based injection hacked-client for Minecraft using Minecraft Forge based on LiquidBounce

FDPClient A free mixin-based injection hacked-client for Minecraft using Minecra

A lightweight Android browser with modern navigation
A lightweight Android browser with modern navigation

Lightning Browser Speed, Simplicity, Security Download Master Branch Dev Branch Features Bookmarks History Multiple search engines (Google, Bing, Yaho

A lightweight super-fast wireless file sharing application built on WiFi Peer-to-Peer technology.
A lightweight super-fast wireless file sharing application built on WiFi Peer-to-Peer technology.

ZipBolt ZipBolt is a file-sharing platform that allows digital devices to share files at incredible speeds using WiFi Peer-to-Peer technology. ZipBolt

Wallum is a superfast ⚡ lightweight wallpaper app, built using Kotlin, Retrofit, MVVM, Paging 3, Hilt, and Navigation Components
Wallum is a superfast ⚡ lightweight wallpaper app, built using Kotlin, Retrofit, MVVM, Paging 3, Hilt, and Navigation Components

Show some ❤️ and star the repo to show support for the project Wallum Android App Wallum is a super-fast 🚀 , lightweight wallpaper app built purely w

📲💬 react-native-fontext is a lightweight library to integrate fonts in your React Native application that works seamlessly in android and iOS devices.
📲💬 react-native-fontext is a lightweight library to integrate fonts in your React Native application that works seamlessly in android and iOS devices.

React Native Fontext react-native-fontext is a lightweight library to integrate fonts in your React Native application that works seamlessly in androi

A truly hackable editor: simple, lightweight, understandable
A truly hackable editor: simple, lightweight, understandable

kanvas A very simple editor built in Kotlin and intended to be extended and hacked. It is very simple to customize it to handle a language defined usi

CutableTextView -  the super lightweight library that helps to you cut long text. ✂️
CutableTextView - the super lightweight library that helps to you cut long text. ✂️

An easy to use CutableTextView when you need to cut a long text. ✂️ ✂️ ✂️ Gradle dependencies { implementation 'com.github.devit951:cutabletextvie

Comments
  • 通过 Fragment 跳转页面的架构不适用页面间埋点参数传递

    通过 Fragment 跳转页面的架构不适用页面间埋点参数传递

    按照该库或者说西瓜的文章的逻辑,目前页面间埋点参数的传递是通过 intent 承载的,但如果单 Activity 多 Fragment 一类通过 Fragment 去进行页面间跳转的架构,应该暂时是无法处理页面间埋点参数的传递吧?

    Fragment 的参数跳转我考虑是可以通过 arguments 承载,但还没想清楚有没有其他坑

    opened by ZDZN 2
  • 似乎只收集view最后一次set的event

    似乎只收集view最后一次set的event

    测试发现: 对于postTrack的view来说,不论是setPageTrackNode还是setTrackNode,在同页面的任意代码块设置Event,post时只收集post之前的最后一个,在最后一个使用.put().put().put()的方式才可以同时收集多个event;同时这也导致referrerKeyMap使用转换规则并不会起作用; 这样在实际使用需要频繁postTrack,或者回归那几种方式收集完统一再setNode; 要是只需在逻辑出口post就能收集该view或者及其子view的所有已过滤的event就好了,这样业务里只有setNode,在界面切换或者退出时统一收集,甚至不需要post,开一个轮询,由外部发送信号匹配event触发收集,满足一些收集秒级行为的需求。

    opened by CGreen11 0
Releases(1.0.1)
Owner
DylanCai
一个兴趣使然的程序“工匠”。
DylanCai
Real time gps location based alarming system tracking the road accident and providing medical assitance plus concern from near by police station.

Real time gps location based alarming system tracking the road accident and providing medical assitance plus concern from near by police station.

Sandeep Verma 1 Mar 12, 2022
A console-based productivity app involving both To-Do Lists and Goal tracking

This is a console-based productivity app involving both To-Do Lists and Goal tracking. It allows users to create To-Dos, check them off, and filter the display between complete/incomplete items

Joel Jossie 3 Dec 25, 2022
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
A plugin about embedded browser for IntelliJ IDEA.

browser English | 简体中文 This plugin provides embedded browser (based on Java Chromium Embedded Framework) support for IntelliJ IDEA. Get from Marketpla

蔡琪暢 0 Dec 15, 2021
Android app for removing tracking parameters from shared URLs

Léon - The URL Cleaner is an Android application which removes tracking and other obsolete parameters from a URL before sharing. Its usage is simple,

Sven Jacobs 89 Dec 30, 2022
Covid-19 Tracking application

Covid-19 Covid-19 Tracking application An open-source Android COVID-19 tracking app built using core UI components from the Robinhood stock trading ap

null 1 Dec 29, 2021
An Open-Source Android app for creating training plans and tracking progress

GymRoutines noahjutz.codeberg.page/gymroutines An Open-Source Android app for creating training plans and tracking progress. Screenshots Contributing

Noah 4 Dec 16, 2022
MeuRastreio - Tracking app for studies and personal use

Meu Rastreio APP para rastreio de encomendas rastreáveis pelos correios. Criado

David Castro 10 Dec 15, 2022
AVTS App - S.I.T Global PBL 2021 - Automatic Visitor Tracking System Android Application

S.I.T Global PBL 2021 - Automatic Visitor Tracking System Android Application De

null 0 Feb 13, 2022
DNS-based Host Blocker (and lightweight ad blocker) for Android

DNS-Based Host Blocking for Android This is a DNS-based host blocker for Android. In the default configuration, several widely-respected host files ar

Julian Andres Klode 1.9k Jan 8, 2023