Giter VIP home page Giter VIP logo

android-sdk's Introduction

ThinkingData Android SDK

ThinkingData Android SDK 为 Android 代码埋点提供了 API. 主要功能包括:

  • 上报事件数据和用户属性数据
  • 本地数据缓存
  • 多实例上报
  • 用户数据自动采集

本项目包括以下模块:

  • thinkingsdk: 核心功能的实现
  • aopplugin: 基于AOP 的自动埋点插件(可选)
  • runtime: 自动埋点支持库(与 aopplugin 一同发布)
  • demox: 使用 ThinkingData Android SDK 的 demo.

集成方法

Gradle 编译环境: 在 build.gradle 中添加以下依赖项:

dependencies {
    implementation 'cn.thinkingdata.android:ThinkingAnalyticsSDK:2.7.5'
}

如果需要使用自动采集功能(控件点击事件和 Fragment 浏览事件),请添加自动采集插件(可选):

apply plugin: 'cn.thinkingdata.android'

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'cn.thinkingdata.android:android-gradle-plugin:2.0.1'
    }
}

上报数据

在上报之前,首先通过以下方法初始化 SDK

ThinkingAnalyticsSDK instance = ThinkingAnalyticsSDK.sharedInstance(mContext, TA_APP_ID, TA_SERVER_URL);

参数TA_APP_ID是您的项目的APP_ID,在您申请项目时会给出,请在此处填入

参数TA_SERVER_URL为数据上传的URL

如果您使用的是数数科技云服务,请输入以下URL:

http://receiver.ta.thinkingdata.cn

https://receiver.ta.thinkingdata.cn

如果您使用的是私有化部署的版本,请输入以下URL:

http://数据采集地址

后续可以通过如下两种方法使用 SDK

instance.track("some_event");

ThinkingAnalyticsSDK.sharedInstance(this, TA_APP_ID).track("some_event");

如果您详细的使用指南,可以查看Android SDK 使用指南.

感谢

android-sdk's People

Contributors

thinkingdataanalytics avatar bugliee 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.