GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sumitmundra/NZGoogleAnalytics: Facilitates the use of Google Analytics API for iOS.

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
Example
Example
 
 
NZGoogleAnalytics.xcodeproj
NZGoogleAnalytics.xcodeproj
 
 
NZGoogleAnalytics
NZGoogleAnalytics
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
NZGoogleAnalytics.podspec
NZGoogleAnalytics.podspec
 
 
Podfile
Podfile
 
 
README.md
README.md
 
 

Repository files navigation

#NZGoogleAnalytics License MIT

Quickly and easily integration with Google Analytics API for iOS.

Build Status Cocoapods Cocoapods

Requirements

NZGoogleAnalytics works on iOS 5.0+ version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation.framework

You will need LLVM 3.0 or later in order to build NZGoogleAnalytics.

NZGoogleAnalytics uses Google Analytics SDK for iOS and NZBundle.

Adding NZGoogleAnalytics to your project

Cocoapods

CocoaPods is the recommended way to add NZGoogleAnalytics to your project.

  • Add a pod entry for NZGoogleAnalytics to your Podfile:
pod 'NZGoogleAnalytics', '~> 0.0.1'
  • Install the pod(s) by running:
pod install

Source files

Alternatively you can directly add source files to your project.

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Open your project in Xcode, then drag and drop all files at NZGoogleAnalytics folder onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
  3. Install Google Analytics SDK for iOS and your frameworks dependencies
  4. Install NZBundle

Info

  • Default values for debug/release mode:

    • trackUncaughtExceptions: NO
    • dispatchInterval: 5 seconds
    • logLevel: kGAILogLevelNone
  • Default values for distribution mode:

    • trackUncaughtExceptions: YES
    • dispatchInterval: 20 seconds
    • logLevel: kGAILogLevelNone
  • NZGoogleAnalytics use NZBundle for change build version name:

    • Debug and Relase: X.X.Xa alpha
    • Distribution: X.X.Xa

Usage

  • You will need to define NZ_GA_TRACKINGID at your project prefix header *-Prefix.pch:
// define your Google Analytics Tracking ID
#define NZ_GA_TRACKINGID "UA-000000-01"
  • The NZGoogleAnalytics overrides the +(void)load; method of NSObject class, which is called every time the application starts.

  • You can change the default setting:

#import "NZGoogleAnalytics.h"
...
[NZGoogleAnalytics setTrackUncaughtExceptions:YES];
BOOL trackUncaughtExceptions = [NZGoogleAnalytics trackUncaughtExceptions];
    
[NZGoogleAnalytics setDispatchInterval:60];
NSTimeInterval dispatchInterval = [NZGoogleAnalytics dispatchInterval];
    
[NZGoogleAnalytics setLogLevel:kGAILogLevelError];
GAILogLevel logLevel = [NZGoogleAnalytics logLevel];
  • Easy track your View Controller:

    • Add NZGoogleAnalytics-Tracker.plist file to your project with the following configuration:
      • class_name: Your view controller class name
      • view_name: Your track view name

NZCircularImageView

  • Configure your View Controller class:
#import "NZGoogleAnalyticsTracker.h"
...

// screen name: /ios/first_view
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [NZGoogleAnalyticsTracker trackViewWithController:self];
}
#import "NZGoogleAnalyticsTracker.h"
...

// screen name: /ios/first_view/id_001
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [NZGoogleAnalyticsTracker trackViewWithController:self withIdentifier:@"id_001"];
}

License

This code is distributed under the terms and conditions of the MIT license.

Change-log

A brief summary of each NZGoogleAnalytics release can be found on the wiki.

About

Facilitates the use of Google Analytics API for iOS.

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

8 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.