<commit_before># GoSquared iOS

**This is an early beta, please open an issue if you find anything not working, or to leave feedback for improvement. You can also get in touch directly: <<EMAIL>>.**

## Installation

### Installing with CocoaPods (Recommended)

1. Install [CocoaPods](https://cocoapods.org) using `gem install cocoapods`.
2. Create a new Podfile using `pod init`.
3. There are two options for adding GoSquared to your Podfile:
 - If you want automatic tracking of your views, add `pod 'GoSquared/Autoload'`
 - If you dont not want this, add `pod 'GoSquared'` to your Podfile.
4. Run `pod install` to install. This will generate a new Xcode workspace for you to open and use.

### Installing with Carthage

Installation with [Carthage](https://github.com/Carthage/Carthage) is supported, however automatic view tracking will not be available. As such, you'll need to call `trackScreen:` on each of your ViewControllers.

For instructions using Carthage, [please read their documentation](https://github.com/Carthage/Carthage).

## Configuration

Make sure you initialise the library with your site token before calling any tracking / people methods otherwise the library will throw an exception. It is recommended to add the below line to your UIApplication's `didFinishLaunchingWithOptions` method.

**Objective-C:**

```objc
#import <GoSquared/GoSquared.h>

// ...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [GoSquared sharedTracker].token = @"your-site-token";
    [GoSquared sharedTracker].key   = @"your-api-key";

    // optionally set logging level: Debug, Quiet (Default), Silent
    [GoSquared sharedTracker].logLevel = GSLogLevelDebug;
    
    // if your app primarily runs in the background and you want visitors to show in
    // your Now dashboard, you should set the following to `YES` (default: NO) 
    [GoSquared sharedTracker].shouldTrackInBackground = YES;

    return YES;
}
```

**Swift:**

```swift
import GoSquared

// ...

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    GoSquared.sharedTracker().token = "your-site-token"
    GoSquared.sharedTracker().key   = "your-api-key"

    // optionally set logging level: Debug, Quiet (Default), Silent
    GoSquared.sharedTracker().logLevel = .Debug
    
    // if your app primarily runs in the background and you want visitors to show in
    // your Now dashboard, you should set the following to `true` (default: false) 
    GoSquared.sharedTracker().shouldTrackInBackground = true

    return true
}
```

## Page View Tracking

### Automatic Page View Tracking (Recommended)

> **Note**: This is only available if you installed with CocoaPods.

Make sure you're using the `GoSquared/Autoload` subspec in your Podfile. Configure your Site Token and API Key as described above, and you're good to go!

If needed, you can disable tracking on indiviual ViewControllers, or set a custom title:

**Objective-C:**

```objc
#import <GoSquared/GoSquared.h>

// ...

- (void)viewDidLoad {
    [super viewDidLoad];

    // use this to override the title property on a ViewController class
    self.trackingTitle = @"My Custom Title";
    // set this to YES to disable tracking for a particular ViewController
    self.doNotTrack = YES;
}

```<commit_msg>Updated 'site' terminology to 'project'<commit_after># GoSquared iOS

**This is an early beta, please open an issue if you find anything not working, or to leave feedback for improvement. You can also get in touch directly: <<EMAIL>>.**

## Installation

### Installing with CocoaPods (Recommended)

1. Install [CocoaPods](https://cocoapods.org) using `gem install cocoapods`.
2. Create a new Podfile using `pod init`.
3. There are two options for adding GoSquared to your Podfile:
 - If you want automatic tracking of your views, add `pod 'GoSquared/Autoload'`
 - If you dont not want this, add `pod 'GoSquared'` to your Podfile.
4. Run `pod install` to install. This will generate a new Xcode workspace for you to open and use.

### Installing with Carthage

Installation with [Carthage](https://github.com/Carthage/Carthage) is supported, however automatic view tracking will not be available. As such, you'll need to call `trackScreen:` on each of your ViewControllers.

For instructions using Carthage, [please read their documentation](https://github.com/Carthage/Carthage).

## Configuration

Make sure you initialise the library with your project token before calling any tracking / people methods otherwise the library will throw an exception. It is recommended to add the below line to your UIApplication's `didFinishLaunchingWithOptions` method.

**Objective-C:**

```objc
#import <GoSquared/GoSquared.h>

// ...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [GoSquared sharedTracker].token = @"your-project-token";
    [GoSquared sharedTracker].key   = @"your-api-key";

    // optionally set logging level: Debug, Quiet (Default), Silent
    [GoSquared sharedTracker].logLevel = GSLogLevelDebug;
    
    // if your app primarily runs in the background and you want visitors to show in
    // your Now dashboard, you should set the following to `YES` (default: NO) 
    [GoSquared sharedTracker].shouldTrackInBackground = YES;

    return YES;
}
```

**Swift:**

```swift
import GoSquared

// ...

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    GoSquared.sharedTracker().token = "your-project-token"
    GoSquared.sharedTracker().key   = "your-api-key"

    // optionally set logging level: Debug, Quiet (Default), Silent
    GoSquared.sharedTracker().logLevel = .Debug
    
    // if your app primarily runs in the background and you want visitors to show in
    // your Now dashboard, you should set the following to `true` (default: false) 
    GoSquared.sharedTracker().shouldTrackInBackground = true

    return true
}
```

## Page View Tracking

### Automatic Page View Tracking (Recommended)

> **Note**: This is only available if you installed with CocoaPods.

Make sure you're using the `GoSquared/Autoload` subspec in your Podfile. Configure your Project Token and API Key as described above, and you're good to go!

If needed, you can disable tracking on indiviual ViewControllers, or set a custom title:

**Objective-C:**

```objc
#import <GoSquared/GoSquared.h>

// ...

- (void)viewDidLoad {
    [super viewDidLoad];

    // use this to override the title property on a ViewController class
    self.trackingTitle = @"My Custom Title";
    // set this to YES to disable tracking for a particular ViewController
    self.doNotTrack = YES;
}

```
{'fraction_non_alphanumeric': 0.09694477085781433, 'fraction_numerical': 0.0011750881316098707, 'mean_word_length': 4.115702479338843, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4371884', 'n_tokens_mistral': 2022, 'n_tokens_neox': 1890, 'n_words': 772}