Google Analytics in IOS(六)—— 社交

来源:互联网 发布:食品经营许可网络平台 编辑:程序博客网 时间:2024/06/06 00:02

       这是官方文档的,部分段落没有翻译(一是能力有限,二是也有些翻译过来就变味了)。如有错误,欢迎指正。

Overview

       社交测量允许你使用多种社交网络分享来测量一个用户的交互,推荐窗体小部件植入你的内容中。
社会互动由以下字段构成:
  • NSString network – represents the social network with which the user is interacting (e.g. Google+, Facebook, Twitter, etc.).
  • NSString action – represents the social action taken (e.g. Like, Share, +1, etc.).
  • NSString target (optional) – represents the content on which the social action is being taken (i.e. a specific article or video).
    通过Google Analytics SDK for iOS v2.x收集的社会交往数据只适用于自定义报告。(什么是自定义报告???)

Implementation

       To send a social interaction to Google Analytics, call sendSocial:withAction:withTarget: as in the following example, where an interaction with a Twitter Tweet button is measured on the Analytics developer site homepage:
[tracker sendSocial:@"Twitter"          withAction:@"Tweet"          withTarget:@"https://developers.google.com/analytics"];  // Send social interaction.