SlideShare a Scribd company logo
Google Analytics for
iOS
Created by:
Pawan Ramteke
(iOS Developer)
(4-3-2016)
It is a service offered by Google that generates
detailed statistics about your website or mobile app’s
usage.
Google Analytics is a great tool for measuring your
app’s usage to test if new features are working both
functionally and experientially.
What is Google
Analytics ?
Google Analytics for your
App
Go to www.google.com/analytics. The homepage should
appear like so:
Click here for sign
in
Sign in to Google Analytics
To start Analytics for your account you need to sign in with your Google
account. After click on sign in button , Select Google Analytics Option and
then continue sign in.
Once you sign in with Google account , the first screen you will see, the
Steps to Analyze your app or website.
After Click on Sign up button , you will see the page to create new account
for your app.
Google then asks you to submit the details for the app you want to track.
Make sure to choose Mobile app at the top and enter the information as
required.
Google then generate a unique Tracking Id for submitted App.
Admin Name
Your App
Name
Downloading the Google Analytics iOS
SDK
After generating a Tracking Id , Google provide you a link for downloading
the SDK for appropriate app and also show the steps for integrating the
SDK to your app.
Click here to download SDK for iOS
After click on the SDK download link , Google provide a steps to add
analytics to your app and also provide the link to download the
configuration file for your project.
Click here to download the Configuration
File
After clicking GET CONFIGURATION FILE button , a new POPUP window will
open in which you have to add your registered App name and you’re your
app Tracking Id in iOS Bundle Id box.
1.Click here to
analyze app
2.Click here to
get configuration
file
Download plist
file and add to
your app file
Select the Admin view on the top right.
You will see the main dashboard area for managing your
Accounts, Properties, and Views.
Account Property View
(profile)
Dashboard for User
Setting up Analysis for
AppOpen your app where you want to add Analysis.
Add GoogleService-Info.plist file in your project
Create Cocoa pods for app
Analytics uses CocoaPods to install and manage
dependencies.
Open project file in finder.
If you have not already created a Podfile for your application,
create one now: Open terminal and type pod init
Open the Podfile created for your application and add the
following:
platform :iOS, ’7.0’
use_frameworks!
pod 'Google/Analytics'
Save the file and run: pod install
This creates an .xcworkspace file for your application. Use this
After installation of pod in your project it will create a pod files.
Open Podfile
Initialize Analytics for your
app
Now that you have the configuration file for your project, you're ready to
begin implementing. First, configure the shared Analytics object inside
AppDelegate.
To do these changes, first add Analytics inside AppDelegate:
#import <Google/Analytics.h>
Then, overload the didFinishLaunchingWithOptions method to configure
GGLContext:
// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@",
configureError);
// Optional: configure GAI options.
GAI *gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = YES; // report uncaught exceptions
gai.logger.logLevel = kGAILogLevelVerbose; // remove before app release
Google analytics for iOS
Add screen tracking
To keep track of screen:
Open a View Controller that you'd like to track.
Your code should do the following:
Add the required <Google/Analytics.h> header.
Use a viewWillAppear method to insert screen tracking.
Provide a name for the screen and execute tracking.
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
[tracker set:kGAIScreenName value:@”name of Tracking View”];
[tracker send:[[GAIDictionaryBuilder createScreenView] build]];
Google analytics for iOS
Enjoy Coding

More Related Content

PDF
How to register your application to authorize o365 graph api
PPTX
Write an application that draws basic graphical primitives.pptx
PPTX
Building a YellowAnt application with .NET
PDF
Building a YellowAnt Application with Ruby on Rails
PPTX
Android Application that makes use of RSS Feed.pptx
PPTX
Implementing Google User Authentication In GAE Application
PPTX
Hello android example.
PPTX
Android Layout.pptx
How to register your application to authorize o365 graph api
Write an application that draws basic graphical primitives.pptx
Building a YellowAnt application with .NET
Building a YellowAnt Application with Ruby on Rails
Android Application that makes use of RSS Feed.pptx
Implementing Google User Authentication In GAE Application
Hello android example.
Android Layout.pptx

What's hot (20)

PPTX
Apidd Member Management
PPT
Beta testing guidelines for developer
PPTX
ApiDD Consumer
PPTX
Android Intent.pptx
PPTX
Adding you API to ApiDD
PPTX
ApiDD Overview
PPTX
Point and Click App Building Workshop
PDF
Data Logger App
PPTX
Eclipse e git
PPTX
How to sync tally data
PPTX
Sharepoint 2013
PPTX
Android Programming.pptx
PPTX
Salesforce.com Lightning
PPTX
RSS Tutorial
PPTX
RSS Tutorial
PPTX
Create an android app for database creation using.pptx
PPTX
Android course (lecture2)
PDF
Article writer pro
PPTX
Shopify
PDF
Process Of The Data access for the users
Apidd Member Management
Beta testing guidelines for developer
ApiDD Consumer
Android Intent.pptx
Adding you API to ApiDD
ApiDD Overview
Point and Click App Building Workshop
Data Logger App
Eclipse e git
How to sync tally data
Sharepoint 2013
Android Programming.pptx
Salesforce.com Lightning
RSS Tutorial
RSS Tutorial
Create an android app for database creation using.pptx
Android course (lecture2)
Article writer pro
Shopify
Process Of The Data access for the users
Ad

Similar to Google analytics for iOS (20)

PDF
iPhone first App Store submission
PDF
Add Google Analytics to Track Your Digital Documents
PPTX
Google analytics
PDF
4 Ways to Build an App Without Code | AppSheet
PDF
12 simple steps to prepare your i os app for development and distribution (1)...
PPTX
How to submit ios app in Appstore
PPTX
Flutter Android / iOS Build Preparation
PDF
Angular 11 google social login or sign in tutorial using angularx social-login
PPTX
Fraudpointer - Google Apps integration
PDF
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
PPTX
Application Deployment Android application.pptx
PPT
10 Web 2.0 Ideas to Keep Your Intranet Fresh
DOCX
Hospital app project (how to upload app)
PDF
App engine install-windows
PDF
Whitepaper - how to launch a mobile app successfully!
PDF
Google analytics reporting using api
PPTX
How to build your own Android App -Step by Step Guide
PDF
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PDF
PDF
iPhone first App Store submission
Add Google Analytics to Track Your Digital Documents
Google analytics
4 Ways to Build an App Without Code | AppSheet
12 simple steps to prepare your i os app for development and distribution (1)...
How to submit ios app in Appstore
Flutter Android / iOS Build Preparation
Angular 11 google social login or sign in tutorial using angularx social-login
Fraudpointer - Google Apps integration
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Application Deployment Android application.pptx
10 Web 2.0 Ideas to Keep Your Intranet Fresh
Hospital app project (how to upload app)
App engine install-windows
Whitepaper - how to launch a mobile app successfully!
Google analytics reporting using api
How to build your own Android App -Step by Step Guide
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
Ad

Google analytics for iOS

  • 1. Google Analytics for iOS Created by: Pawan Ramteke (iOS Developer) (4-3-2016)
  • 2. It is a service offered by Google that generates detailed statistics about your website or mobile app’s usage. Google Analytics is a great tool for measuring your app’s usage to test if new features are working both functionally and experientially. What is Google Analytics ?
  • 3. Google Analytics for your App Go to www.google.com/analytics. The homepage should appear like so: Click here for sign in
  • 4. Sign in to Google Analytics To start Analytics for your account you need to sign in with your Google account. After click on sign in button , Select Google Analytics Option and then continue sign in. Once you sign in with Google account , the first screen you will see, the Steps to Analyze your app or website.
  • 5. After Click on Sign up button , you will see the page to create new account for your app. Google then asks you to submit the details for the app you want to track. Make sure to choose Mobile app at the top and enter the information as required. Google then generate a unique Tracking Id for submitted App. Admin Name Your App Name
  • 6. Downloading the Google Analytics iOS SDK After generating a Tracking Id , Google provide you a link for downloading the SDK for appropriate app and also show the steps for integrating the SDK to your app. Click here to download SDK for iOS
  • 7. After click on the SDK download link , Google provide a steps to add analytics to your app and also provide the link to download the configuration file for your project. Click here to download the Configuration File
  • 8. After clicking GET CONFIGURATION FILE button , a new POPUP window will open in which you have to add your registered App name and you’re your app Tracking Id in iOS Bundle Id box.
  • 9. 1.Click here to analyze app 2.Click here to get configuration file Download plist file and add to your app file
  • 10. Select the Admin view on the top right. You will see the main dashboard area for managing your Accounts, Properties, and Views. Account Property View (profile) Dashboard for User
  • 11. Setting up Analysis for AppOpen your app where you want to add Analysis. Add GoogleService-Info.plist file in your project
  • 12. Create Cocoa pods for app Analytics uses CocoaPods to install and manage dependencies. Open project file in finder. If you have not already created a Podfile for your application, create one now: Open terminal and type pod init Open the Podfile created for your application and add the following: platform :iOS, ’7.0’ use_frameworks! pod 'Google/Analytics' Save the file and run: pod install This creates an .xcworkspace file for your application. Use this
  • 13. After installation of pod in your project it will create a pod files. Open Podfile
  • 14. Initialize Analytics for your app Now that you have the configuration file for your project, you're ready to begin implementing. First, configure the shared Analytics object inside AppDelegate. To do these changes, first add Analytics inside AppDelegate: #import <Google/Analytics.h> Then, overload the didFinishLaunchingWithOptions method to configure GGLContext: // Configure tracker from GoogleService-Info.plist. NSError *configureError; [[GGLContext sharedInstance] configureWithError:&configureError]; NSAssert(!configureError, @"Error configuring Google services: %@", configureError); // Optional: configure GAI options. GAI *gai = [GAI sharedInstance]; gai.trackUncaughtExceptions = YES; // report uncaught exceptions gai.logger.logLevel = kGAILogLevelVerbose; // remove before app release
  • 16. Add screen tracking To keep track of screen: Open a View Controller that you'd like to track. Your code should do the following: Add the required <Google/Analytics.h> header. Use a viewWillAppear method to insert screen tracking. Provide a name for the screen and execute tracking. id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker]; [tracker set:kGAIScreenName value:@”name of Tracking View”]; [tracker send:[[GAIDictionaryBuilder createScreenView] build]];