如何使用JavaScript在解析分析中跟踪应用程序打开? [英] How to track app open in parse analytics using javascript?

查看:75
本文介绍了如何使用JavaScript在解析分析中跟踪应用程序打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用解析,我想跟踪应用打开和其他事件.我在他们的文档中看到了一个示例

I am using parse and I want to track app open and other events. I have seen an example in their documentation

 var dimensions = {
    // Define ranges to bucket data points into meaningful segments
    priceRange: '1000-1500',
    // Did the user filter the query?
    source: 'craigslist',
    // Do searches happen more often on weekdays or weekends?
    dayType: 'weekday'
};
// Send the dimensions to Parse along with the 'search' event
Parse.Analytics.track('search', dimensions);

这将更新分析仪表板上的Analytics Requests.

This updates Analytics Requests on analytics dashboard.

如何跟踪App Opens?

推荐答案

我在分析的REST api文档中找到了事件名称. 所以工作的代码是:

I found the event name in documentation of REST api of analytics. So the code worked is:

Parse.Analytics.track('AppOpened', { 'user': userObj}, function(response){
    // callback function
});

您还可以仅使用自定义事件名称来跟踪自定义事件,例如:

You can also track custom events just with your custom event name like:

Parse.Analytics.track('CustomEvent', { 'user': userObj, 'otherInfo': otherInfo}, function(response){
    // callback function
});

您可以在analytics tab -> events in left sidebar -> select custom breakdowns from list中看到此内容,并且您会在右侧栏中看到自定义事件的列表.

You can see this in analytics tab -> events in left sidebar -> select custom breakdowns from list and you will see list of your custom events at right sidebar.

这篇关于如何使用JavaScript在解析分析中跟踪应用程序打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆