问题描述
我需要通过广告系列src跟踪我的ios应用安装。我正在使用。
I need to track my ios app installs by campaign src. and i am using google Analytics campaign measurement for that .
- 我需要将广告系列来源与。
,因此每个事件都会将广告系列来源(引荐来源)作为维度。
这将帮助我获得由活动源分发的活跃用户!我怎么能这样做?
在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开发者
From the sample code given from Google Developerhttps://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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!