npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-zhugeio

v1.0.1

Published

Cordova Plugin For Zhugeio Mobile Analysis

Downloads

19

Readme

cordova-plugin-zhugeio

诸葛移动统计的cordova插件,支持ios与Android平台

环境需求

  • iOS 7.0+
  • Android SDK 11+
  • cordova-ios 4.3.0
  • cordova-cli 6.4.0

集成方法

  • 新建一个Cordova工程,添加所需平台
cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add ios android
  • 添加Zhuge Cordova插件,并添加ZHUGE_APP_KEY
cordova plugin add cordova-plugin-zhugeio --save -variable ZHUGE_APP_KEY="填写Zhuge分配给您的AppKey"
  • www/js/index.js/中使用对应的接口

  • 运行cordova build进行测试

API说明

  • track 追踪事件

    Zhugeio.track('事件名称',{'属性1':'值1','属性2':'值2'});
      

    也可不带属性

    Zhugeio.track('事件名称');
  • 自定义时长事件

    使用startTrack()开始事件

    Zhugeio.startTrack('事件名称');
    

    使用相同的事件名称结束事件

    Zhugeio.endTrack('事件名称',{'属性1':'值1'});
    

    startTrack()endTrack()需成对出现,单独使用没有效果。

  • 标记用户

    使用identify()标记用户

    Zhugeio.identify('用户ID',{'用户属性':'用户值'})
      
  • 开启实时调试

    Zhugeio.openDebug();
    
  • 开始日志输出

    该方法仅对Android平台可用,iOS平台请参阅 iOS集成文档

    Zhugeio.openLog();
      
  • 选用 设置数据上传地址

    使用setUploadURL()设置数据上传地址

    Zhugeio.setUploadURL('https://www.baidu.com','http://www.baidu.backup.com')
    

    参数传递需包含所用协议(http或https)

    **注意:**该接口仅供诸葛的私有部署用户使用,在使用时,请在调用其他所有接口之前,最开始进入应用时调用,一般情况下在www/index.html/中。若调用过晚,数据可能上传到诸葛默认的数据服务器中,造成统计不准。