Skip to content

Instantly share code, notes, and snippets.

@ydn
ydn / FlurryiOSNativeAdTracking.swift
Created June 11, 2015 17:30
Flurry iOS Native Ad Tracking (Swift Example)
func setupWithFlurryNativeAd(adNative: FlurryAdNative, atPosition: NSInteger){
ad.removeTrackingView()
self.ad = adNative;
self.ad.trackingView = self;
}
@ydn
ydn / configure_data_second.swift
Created June 10, 2015 23:42
Configure when data is sent to Flurry (second box, Swift example)
Flurry.setSessionReportsOnPauseEnabled(true);
@ydn
ydn / configure_data.swift
Created June 10, 2015 23:40
Configure when data is sent to Flurry (Swift)
Flurry.setSessionReportsOnCloseEnabled(true);
@ydn
ydn / track_page_views_second.swift
Created June 10, 2015 23:39
Track Page Views (second box)
Flurry.logPageView();
@ydn
ydn / track_page_views.swift
Created June 10, 2015 23:38
Track Page Views
Flurry.logAllPageViewsForTarget(navigationController);
@ydn
ydn / track_application_errors.swift
Created June 10, 2015 23:37
Track Application Errors
Flurry.logError("ERROR_NAME", message: "ERROR_MESSAGE", exception: e);
@ydn
ydn / track_user_id.swift
Last active November 6, 2020 03:59
Track User ID
Flurry.setUserID("USER_ID");
@ydn
ydn / gender.swift
Last active August 29, 2015 14:22
Log user's gender
Flurry.setGender("m");
@ydn
ydn / track_age_and_gender.swift
Created June 10, 2015 23:33
Track Age and Gender
Flurry.setAge(21);
@ydn
ydn / gps_location.swift
Last active August 29, 2015 14:22
Set GPS of user (Swift)
if let location:CLLocation = locationManager.location {
Flurry.setLatitude(location.coordinate.latitude,
longitude: location.coordinate.longitude,
horizontalAccuracy: location.horizontalAccuracy,
verticalAccuracy: location.verticalAccuracy
);
}