iOS Tutorial Google Analytics

Edit: use iFirebaseAnalytics instead.

B4i v2.50 includes a wrapper for Google Analytics SDK (iAnalytics).



Using this library is simple.

You need to initialize the AnalyticsTracker with the tracking id (it looks like UA-xxxxx-y).
You should then call tracker.SendScreenView in the Page_Appear of each page.

The ScreenName is an identifier that you will later use to identify the page.

The last method is TrackEvent which allows you to manually send a GA event.

By using this library you agree to Google terms and privacy policy:
http://www.google.com/analytics/tos.html
https://developers.google.com/analytics/devguides/collection/protocol/policy

If you are using a local builder then you should download the SDK: https://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download and copy libGoogleAnalyticsServices.a to the Libs folder.
 
Last edited:

Moosi

Member
Licensed User
Longtime User
This is really cool and simple, Thanks Erel!
I works like a charm.
 

tucano2000

Active Member
Licensed User
Longtime User
Working here with GoogleAnalyticsServicesiOS_3.13.zip, Xcode 6.4, local builder.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…