GithubHelp home page GithubHelp logo

pactortester / garbevents Goto Github PK

View Code? Open in Web Editor NEW
106.0 11.0 33.0 1.41 MB

Buried point data testing tool.

Home Page: https://pypi.org/project/garbevents/

License: MIT License

Python 100.00%
garbevents diff mitmproxy growingio zhugeio pypi python analysys sensorsdata

garbevents's Introduction

garbevents

本项目由 JetBranins 赞助相关开发工具

Build Status PyPI PyPI - Python Version GitHub top language Downloads GitHub stars https://blog.csdn.net/flower_drop

埋点适配计划

  • 诸葛 IO
  • 神策数据
  • GrowingIO 埋点数据
  • Argo 易观方舟
  • 友盟
  • C4J
  • Mixpanel
  • GA
  • Ptmind Ptengine
  • 国双 WebDissector
  • 谷歌分析 Google Analytics

Logo

安装

pip install -U garbevents

仓库地址:

社区地址

适用场景

  1. 使用 以上厂商 作为埋点收集工具的 。
  2. 需要回归验证大批量埋点是否丢失的。
  3. 使用本工具 自动抓取解析埋点信息数据校验埋点是否 丢失。

功能

  1. 自动解析 移动端\桌面端\h5页面 触发的埋点信息,解密后生成 now_data.txt
  2. 去重后和已知埋点信息diff,保存文件 lost_data.txt

使用

  • 启动服务
  1. 在cmd启动代理服务
gb -p 8889 -s test_script.py

                     __                         __      
   ____ _____ ______/ /_  ___ _   _____  ____  / /______
  / __ `/ __ `/ ___/ __ \/ _ \ | / / _ \/ __ \/ __/ ___/
 / /_/ / /_/ / /  / /_/ /  __/ |/ /  __/ / / / /_(__  ) 
 \__, /\__,_/_/  /_.___/\___/|___/\___/_/ /_/\__/____/  v2.0.5
/____/ 

Proxy server listening at http://*:8889
  • 连接代理
  1. cmd中运行ipconfig 找到自己的ip地址
  2. 手机wifi高级选项,代理选择手动,添加代理服务器
ip:你的电脑ip, 端口:8889
  • 下载证书
  1. 在手机浏览器中打开网址 mitm.it
  2. 选择对应的证书下载安装
mitm.it
  • 开始使用
  1. 此时便可以在手机端操作触发埋点,控制台实时打印当前触发的埋点
  2. 如果想查看丢失的埋点需要先在 ST.all_events 全局变量中传入全部埋点信息
  3. 例如:ST.all_events = ['event_name_1', 'event_name_2']

命令

# 只打印所需日志
gb -p 8889 -q -s test_script.py

诸葛IO Demo

from garbevents.events import GetData
from garbevents.settings import Settings as ST

# 埋点上传url 
ST.url = 'https://datain.zhuge.com'
# 报告生成路径 
ST.report_path = 'report'
# 所有事件名称 
ST.all_events = ['event_name_1', 'event_name_2']
# 接口地址
ST.interface_url = ['apipool', 'APIPOOL']

addons = [
    GetData()
]

神策数据 Demo 1

from garbevents.sensors_events import GetData
from garbevents.settings import Settings as ST

# 埋点上传url 
ST.url = 'http://sensor.wodidashi.com'
# 报告生成路径 
ST.report_path = 'report'
# 所有事件名称 
ST.all_events = ['event_name_1', 'event_name_2']

addons = [
    GetData()
]

神策数据 Demo 2

from garbevents.custom_sensors_events import GetData
from garbevents.settings import Settings as ST

# 埋点上传url 
ST.url = 'http://sensor.wodidashi.com'
# 报告生成路径 
ST.report_path = 'report'
# 所有事件名称 
ST.all_events = ['event_name_1', 'event_name_2']

addons = [
    GetData()
]

GrowingIO Demo

from garbevents.growingio_events import GetData
from garbevents.settings import Settings as ST

# 埋点上传url 
ST.url = 'https://wxapi.growingio.com'
# 报告生成路径 
ST.report_path = 'report'
# 所有事件名称 
ST.all_events = ['event_name_1', 'event_name_2']
addons = [
    GetData()
]

Argo 易观方舟 Demo

from garbevents.argo_events import GetData
from garbevents.settings import Settings as ST

# 埋点上传url 
ST.url = 'https://uat.analysys.cn:4089/'
# 报告生成路径 
ST.report_path = 'report'
# 所有事件名称 
ST.all_events = ['event_name_1', 'event_name_2']
addons = [
    GetData()
]

运行截图

用法拓展

  1. 结合UI自动化,嵌入到你的平台或者框架中,运行自动化脚本的同时,也测试了埋点。
  2. 部署到公司服务器,给测试部门的同学用,助人为乐!!!

趋势图

Stargazers over time

感谢

本工具中的代理功能使用 mitmproxy 实现。

Contributors

以上便是 garbevents 的基本用法介绍。

如果您有发现错误,或者您对 garbevents 有任何建议,欢迎到 garbevents Issues 发表,非常感谢您的支持。您的反馈和建议非常宝贵,希望您的参与能帮助 garbevents 做得更好。

garbevents's People

Contributors

autofix-ci[bot] avatar dependabot[bot] avatar murph-zh avatar pactortester avatar qingtian203 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

garbevents's Issues

易观方舟埋点数据加入garbevents 埋点适配计划申请

hi,

这里是易观旗下产品——易观Argo的运营同学朱楠,我们在一个开发者社区看到garbevents的埋点适配计划,非常希望可以和garbevents一起合作,加入埋点适配计划,特此申请。

我们看到garbevents的埋点适配计划里包含诸葛IO、神策数据、GrowingIO埋点数据、mixpanel等,易观也在做基于用户行为的分析、运营及画像产品,即易观方舟产品套件,目前客户数量已达500+,并基于产品产出了金融、新零售、汽车、教育等行业解决方案。易观同时积极深耕开发者生态:

  • 开源调度产品被纳入Apache孵化器项目——apache dolphinscheduler,目前社区人数已达3000+,

  • 开源易观SDK https://github.com/analysys

  • 并积极为presto、clickhouse等社区贡献,

  • 而为了践行“数据能力平民化”、更于2019年推出了易观方舟产品套件中的用户行为分析产品免费版,取名为Argo, https://github.com/analysys/argo-installer ,因此而荟聚了近2000 Argo 社区爱好者,赋能数百家中小企业搭建用户行为分析系统。

以上陈述皆为表达易观对加入garbevents 埋点适配计划的决心、努力和能力,盼回复。可联系我的邮箱[email protected]

神策埋点报错IndexError: list index out of range

拆分后获取API地址====>nyar
Addon error: Traceback (most recent call last):
File "/Users/a/PycharmProjects/ATo/garb-events/venv/lib/python3.7/site-packages/garbevents/sensors_events.py", line 67, in request
request_content = str(flow.request.content).split('&')[2].split('=')[1]
IndexError: list index out of range

请求json解析报错:json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 3361 (char 3360

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

基于GrowingIO会有更新么?

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

实际应用场景

已经用于以下app

  1. 爱问医生
  2. 天眼查
  3. 奈雪点单
  4. 玩吧
  5. 学而思网校
  6. 权大师
  7. 企查查
  8. 51cto
  9. 启信宝
  10. **移动
  11. 海文考研
  12. keep
  13. 轻松筹
  14. 有赞
  15. 悦跑圈
  16. vipkid
  17. ......

手机配置代理后没问网络,怎么访问APP呢

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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.