如何知道用户何时向他们的朋友发送应用请求

发布于 2024-12-02 13:49:56 字数 564 浏览 1 评论 0原文

我有一个带有 Facebook 的 FB.ui({method: 'apprequests', message: 'Come join me...'}) 弹出对话框的“邀请朋友”机制。我想知道实际完成邀请过程的用户的统计数据。通常我通过以下过程订阅 Facebook 事件:

  FB.Event.subscribe('edge.create', function(targetUrl) {
      _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
  });

当用户喜欢某些内容时,我会订阅该事件,并将其发送到 Google Analytics,根据 Facebook 的订阅文档

我很想对应用程序请求使用相同的机制,但在上述文档网页上没有相应的 Facebook 事件。还有别的办法吗?有什么我不知道的事件吗?

I have an "invite friends" mechanism with Facebook's FB.ui({method: 'apprequests', message: 'Come join me...'}) popup dialog. I want to know the stats of users actually completing the invitation process. Normally I subscribe to Facebook events through this process:

  FB.Event.subscribe('edge.create', function(targetUrl) {
      _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
  });

There I'm subscribing to the event for when users like something and sending that to Google Analytics according to Facebook's subscribe documentation.

I'd love to use this same mechanism for apprequests, but there's no Facebook event for that on the above documentation webpage. Is there another way? Is there an event I'm unaware of?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

踏月而来 2024-12-09 13:49:56

与 Like 按钮不同,您实际上可以只使用 直接回调。

FB.ui({method: 'apprequests', message: 'Come join me...'}, function(data){
  if(data){
    var sent = data.request_ids.split(",").length;
   _gaq.push(["_trackEvent", "Facebook App Request", "Request Sent, sent+" Sent", sent]);
 }
 else{ 
    //cancelled the dialog
 }
});

它返回一个包含数组,request_ids;数组中的每个项目都包含他们邀请的人的 Facebook ID。 (出于隐私原因,您不应将实际 ID 发送到 Google Analytics,但对它们进行计数可能很有用。)

(对于发送 5 个应用程序邀请的用户,它会将标签设置为“5 Sent”,并将值设置为5. 这样,您既可以了解发送的邀请总数,也可以了解发送的邀请计数的分布情况。)

Unlike with Like buttons, you can actually just use a direct callback.

FB.ui({method: 'apprequests', message: 'Come join me...'}, function(data){
  if(data){
    var sent = data.request_ids.split(",").length;
   _gaq.push(["_trackEvent", "Facebook App Request", "Request Sent, sent+" Sent", sent]);
 }
 else{ 
    //cancelled the dialog
 }
});

It returns an object that contains an array, request_ids; each item in the array contains the Facebook ID of the person they invited. (For privacy reasons, you should not send the actual IDs to Google Analytics, but counting them can be useful.)

(For a user that sends 5 app invites, it'll set the label to "5 Sent", and the value to 5. That way, you'll have both the total number of invites sent, as well as the ability to discern the distribution of invite counts sent.)

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