@1d/analytics 中文文档教程

发布于 3年前 浏览 25 项目主页 更新于 3年前

1D-Analytics

1D プロダクトの Analytics を行うラッパーです。

Install

yarn add @1d/analytics

Usage

import { Analytics } from "@1d/analytics";
import { amplitudeApiKey } from "../config/consts";

const analytics = new Analytics(amplitudeApiKey);

export const { identify, track, trackScreenView } = analytics;

identify("dummyUserHash", {
  // Any properties you want
  occupation: dummyOccupation,
  email: dummyEmail,
  os: Platform.OS,
})

track("yourEvent", {
  // Any properties you want
  isLikeTea: true,
  isLikeCoffee: true
})

trackScreenView("prevScreen", "currentScreen", {
  // Any properties you want
  postHash: "dummyPostHash"
})

How to release

This package is automatically released via GitHub Actions after PR is merged into master.

All you need is just to modify the version property in package.json when you submit PR.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文