美文网首页
amplitude 埋点工具

amplitude 埋点工具

作者: 秘果_li | 来源:发表于2021-03-16 15:23 被阅读0次

官网地址
https://help.amplitude.com/hc/en-us
项目数据查看地址
https://analytics.amplitude.com

项目中引入amplitude

yarn add amplitude-js

引入依赖包,全局绑定amplitude

const amplitude = require("amplitude-js");

export default ({ Vue }) => {
  amplitude.getInstance().init('你的项目aip-key');
  Vue.prototype.$amplitude = amplitude;
};

开发API介绍

https://developers.amplitude.com/docs/setting-custom-user-ids
js API
https://amplitude.github.io/Amplitude-JavaScript/
一般情况下,用户登陆成功后设置用户的 userId
this.$amplitude.getInstance().setUserId('USER_ID');
在用户退出登录后将 userId 设置为 null
regenerateDeviceId方法用来生成新的的设备ID

`this.$amplitude.getInstance().setUserId(null); 
`this.$amplitude.getInstance().regenerateDeviceId();

触发一个event

this.$amplitude.getInstance().logEvent('EVENT_TYPE', {key:value});

设置user属性

amplitude.getInstance().setUserProperties({key:value});

查看用户数据




(如果没有设置userID的话,amplitude会自动分配一个游客id)

补充: UTM

UTM 介绍
https://buffer.com/library/utm-guide/#case-study-using-utm-parameters-to-tell-the-story-of-star-wars

UTM代码可以跟踪每个链接的性能,用来查看流量的来源

http://www.XXX.com/?utm_source=XXX&utm_medium=XXX&utm_campaign=XXX&utm_content=XXX

相关文章

  • amplitude 埋点工具

    官网地址https://help.amplitude.com/hc/en-us[https://help.ampl...

  • Core Audio <2>

    Each sample represents the amplitude of the wave, or the ...

  • Tree Amplitude

  • 仅通过订单数据分析,能得知什么结果数据?

    一般来说,要得知用户行为,需要通过埋点。现在埋点的工具也很多,比如百度统计、GA等,APP的埋点有友盟、Growi...

  • 埋点要求及分析

    (统计工具:CNZZ、growingio、Umeng) 一、埋点原则 下面这个表,是一个能实现基本功能的埋点规则。...

  • 【用户行为采集】(一)常见埋点方式及对比

    常见的埋点方式主要有三种:代码埋点、全埋点、可视化埋点。 代码埋点 代码埋点是最经典埋点方式,实施埋点的研发将埋点...

  • iOS全埋点实践

    客户端埋点大概分为三类: 代码埋点 可视化埋点 无埋点 1、代码埋点 代码埋点,即在需要埋点的节点调用接口直接上传...

  • 周报(好未来第四周)

    本周工作 埋点的优化,简化api和封装埋点指令 定时抓取临时密码发给钉钉机器人,同步到群里 的小工具 动态换肤的方...

  • 数据埋点

    数据采集及埋点、无埋点 常用数据统计分析工具 谷歌分析、百度统计和腾讯分析 主流的数据收集方式基本都是基于java...

  • 2021-01-22 (冬季学校 2)

    string amplitude from string field theory Ashoke 真的很令人敬佩,...

网友评论

      本文标题:amplitude 埋点工具

      本文链接:https://www.haomeiwen.com/subject/nqbnqltx.html