# Отправка событий о показе экрана

Для ручной отправки события о просмотре экрана необходимо в контроллере вызвать следующий код

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

```swift
TrackerTop100.trackPageView(className: "SCREEN_CLASS", url: "URL", title: "TITLE");
```

{% endtab %}

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

```objectivec
[TrackerTop100 trackPageViewWithClassName: @"SCREEN_CLASS" url: @"URL" title: @"TITLE"];
```

{% endtab %}
{% endtabs %}

**SCREEN\_CLASS** (обязательный) — название активности, например, "MainActivity"\
**URL** (опциональный) — релевантный url для веб-страницы, например, "<https://www.rambler.ru"\\>
**TITLE** (опциональный) — название экрана

**Пример:**

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

```swift
import TrackerTop100SDK

class MainViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        TrackerTop100.trackPageView(className: "MainViewController", url: "https://rambler.ru", title: "Главная страница")
    }
}
```

{% endtab %}

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

```objectivec
@import TrackerTop100SDK;

@interface MainViewController ()

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [TrackerTop100 trackPageViewWithClassName: @"MainViewController" url: @"https://rambler.ru" title: @"Главная страница"];
}

@end

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://top-100-writer.gitbook.io/top100-documentation/nastroika-sbora-i-otpravki-dannykh/ios-sdk/metody-po-rabote-s-ios-sdk/otpravka-sobytii-o-pokaze-ekrana.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
