将自定义数据发送到iOS中的Google Analytics [英] Sending custom data to google analytics in iOS

查看:159
本文介绍了将自定义数据发送到iOS中的Google Analytics的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 iOS 项目中整合了 Google Analytics(分析)其事件的工作参数,我还想发送我的


使用自定义键值的自定义值(udid,userid,username ..)。

是否可以这样做?



如果是,我可以在哪里找到 Google仪表板上的这些值?


我已经尝试过了

https://developers.google.com/analytics/devguides/collection/ios/v3/customdimsmets

解决方案<


希望应用该值的发送调用之前设置一个自定义维度值。自定义维度的定义范围将在
处决定时间哪些附加命中可以与该值相关联


这意味着自定义维度属于命中操作(例如:sendView,sendAction)



自定义维度的示例代码:

  //获取跟踪器对象。 
id tracker = [[GAI sharedInstance] .defaultTracker;

//设置索引1的维度值。
[tracker setCustom:1
dimension:@key1];

//尺寸值与此命中关联并发送。
[tracker sendView:screenName];

然后您可以在Google分析控制台中看到输出,如这个

样本方法已在 analytics 页面


I have integrated google analytics in my iOS project its working propers for events, i also want to sent my

custom values (udid, userid, username..) with custom keys.

Is it possible to do this?

And if yes where can i find those value on Google dashboard?

i have tried

https://developers.google.com/analytics/devguides/collection/ios/v3/customdimsmets

解决方案

Set a custom dimension value just before the send call to which you want the value applied.The defined scope of the custom dimension will determine at processing time which additional hits may be associated with that value.

That means a custom dimension is belong to a hit action(such as: sendView,sendAction)

Sample code for custom dimension:

// Get the tracker object.
id tracker = [[GAI sharedInstance].defaultTracker;

// Set the dimension value for index 1.
[tracker setCustom:1
         dimension:@"key1"];

// Dimension value is associated and sent with this hit.
[tracker sendView:screenName];

then you can see the output in Google analytics console, like this.

sample methods are already available in analytics page

这篇关于将自定义数据发送到iOS中的Google Analytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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