如何获得Campaign源代码分发的活跃用户? Google Analytics活动跟踪ios [英] How to get active users distributed by Campaign source? Google Analytics campaign tracking ios

查看:242
本文介绍了如何获得Campaign源代码分发的活跃用户? Google Analytics活动跟踪ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过广告系列src跟踪我的ios应用安装。我正在使用 Google Analytics(分析)广告系列衡量指标

I need to track my ios app installs by campaign src. and i am using google Analytics campaign measurement for that .


  • 我需要将广告系列来源与 events
    ,因此每个事件都会将广告系列来源(引荐来源)作为维度。
    这将帮助我获得由活动源分发的活跃用户!我怎么能这样做?

在Android中,我可以获取广告系列来源(引荐来源)并将其存储在设备存储空间中(如: NSUserDefaults),然后我发送每个事件。
,但我没有成功将活动源(reffere)存储在IOS中。

in android i can get the campaign source (referrer) and store it in the device storage (like: NSUserDefaults), then i send it with every event. but i didn't succeed to store the the campaign source (reffere) in IOS.

是否可以从Google获得广告系列来源(reffere) analytics ios sdk将其存储在设备存储中?

is it possible to get the campaign source (reffere) from google analytics ios sdk to store it in the device storage ?

plase note :我需要在用户安装应用程序时获取广告系列来源。而不是当用户(已安装应用程序的用户)在点击广告系列横幅时打开我的应用程序。
所以这个不是什么我正在寻找。

plase note: I need to get the campaign source when the user install the applications. and not when a user (who has already the application installed) opened my app when he had tapped on a campaign banner. so this is not what i am looking for.

谢谢

Thanks

推荐答案

来自Google开发者
https://developers.google.com / analytics / devguides / collection / ios / v3 / campaigns

From the sample code given from Google Developer https://developers.google.com/analytics/devguides/collection/ios/v3/campaigns

if(![hitParams get:kGAICampaignSource] && [url host].length !=0) {
    // Set campaign data on the map, not the tracker.
    [hitParams set:@"referrer" forKey:kGAICampaignMedium];
    [hitParams set:[url host] forKey:kGAICampaignSource];

    // add this line to save the campaign source value
    [[NSUserDefaults standardUserDefaults] setObject:[hitParams get:kGAICampaignSource] forKey:@"ReferralID"];

}

这篇关于如何获得Campaign源代码分发的活跃用户? Google Analytics活动跟踪ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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