I need to track my ios app installs by campaign src. and i am using google Analytics campaign measurement for that .
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"];
}