> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/developer/sdk/ios/event-dispatchers/at-internet.md).

# AT Internet

The AT Internet dispatcher automatically dispatches events to the [AT Internet SDK](https://developers.atinternet-solutions.com/apple-universal-en/getting-started-apple-universal-en/operating-principle-apple-universal-en/), including the XTOR tag when it's available.

{% hint style="warning" %}
This dispatcher should not be used in new integrations in favor of Piano Analytics
{% endhint %}

{% tabs %}
{% tab title="SPM" %}

```
github "BatchLabs/Batch-iOS-atinternet-dispatcher"
```

{% endtab %}

{% tab title="CocoaPods" %}
{% code title="Podfile" %}

```
pod 'BatchATInternetDispatcher'
```

{% endcode %}
{% endtab %}
{% endtabs %}

Then, register the dispatcher:

{% tabs %}
{% tab title="Swift" %}

```swift
import BatchATInternetDispatcher

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        BatchEventDispatcher.add(BatchATInternetDispatcher.instance())
        
        [...]

        BatchSDK.start(withAPIKey: "YOUR_API_KEY")
        return true
    }
}

```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec

// MYAppDelegate.h

@interface MYAppDelegate : UIResponder <UIApplicationDelegate>

[...]

@end

// MYAppDelegate.m

@import BatchATInternetDispatcher;

@implementation MYAppDelegate

- (BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [BatchEventDispatcher addDispatcher:[BatchATInternetDispatcher instance]];

    [...]

    [BatchSDK startWithAPIKey:@"MY_API_KEY"];
    return YES;
}

@end
```

{% endtab %}
{% endtabs %}

Batch AT Internet Dispatcher 1.1.0+ will automatically instantiate `Tracker` instances using the default AT Internet configuration, which comes in a plist.\
If you're not using plist-based configuration and would like to manually configure your Tracker in code, you can tell Batch which tracker instance to use:

{% tabs %}
{% tab title="Swift" %}

```swift
// Put this right after BatchEventDispatcher.add(BatchATInternetDispatcher.instance())
let tracker = <your ATInternet tracker initialization code>
BatchATInternetDispatcher.instance().trackerOverride = tracker
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
// Put this right after [BatchEventDispatcher addDispatcher:[BatchATInternetDispatcher instance]];
Tracker *myTracker = ...;
[[BatchATInternetDispatcher instance].trackerOverride = myTracker;
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.batch.com/developer/sdk/ios/event-dispatchers/at-internet.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
