# Web

To track an event using the web package, you can use the corresponding method on the tracker instance. For example:

## Example

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

```kotlin
val properties = WebPageViewedProperties(
    path = path
)
bird.tracker.web.pageViewed(properties)
```

{% endtab %}

{% tab title="Swift" %}

```swift
let properties = WebPageViewedProperties(
    path: path
)
bird.tracker.web.pageViewed(properties)
```

{% endtab %}

{% tab title="Web" %}

```javascript
const properties: WebPageViewedProperties = {
    path: path
};
Bird.tracker.web.pageViewed(properties, event_opts);
```

{% endtab %}
{% endtabs %}

## Methods

### pageViewed()

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

```kotlin
val properties = WebPageViewedProperties(
    path = path
)
bird.tracker.web.pageViewed(properties)
```

{% endtab %}

{% tab title="Swift" %}

```swift
let properties = WebPageViewedProperties(
    path: path
)
bird.tracker.web.pageViewed(properties)
```

{% endtab %}

{% tab title="Web" %}

```javascript
const properties: WebPageViewedProperties = {
    path: path
};
Bird.tracker.web.pageViewed(properties, event_opts);
```

{% endtab %}
{% endtabs %}

#### WebPageViewedProperties

| Property  | Type   |
| --------- | ------ |
| path?     | String |
| referrer? | String |
| search?   | String |
| title?    | String |
| url?      | String |

### pageLostFocus()

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

```kotlin
val properties = WebPageLostFocusProperties(
    path = path
)
bird.tracker.web.pageLostFocus(properties)
```

{% endtab %}

{% tab title="Swift" %}

```swift
let properties = WebPageLostFocusProperties(
    path: path
)
bird.tracker.web.pageLostFocus(properties)
```

{% endtab %}

{% tab title="Web" %}

```javascript
const properties: WebPageLostFocusProperties = {
    path: path
};
Bird.tracker.web.pageLostFocus(properties, event_opts);
```

{% endtab %}
{% endtabs %}

#### WebPageLostFocusProperties

| Property  | Type   |
| --------- | ------ |
| path?     | String |
| referrer? | String |
| search?   | String |
| title?    | String |
| url?      | String |

### formViewed()

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

```kotlin
val properties = WebFormViewedProperties(
    formId = formId
)
bird.tracker.web.formViewed(properties)
```

{% endtab %}

{% tab title="Swift" %}

```swift
let properties = WebFormViewedProperties(
    formId: formId
)
bird.tracker.web.formViewed(properties)
```

{% endtab %}

{% tab title="Web" %}

```javascript
const properties: WebFormViewedProperties = {
    form_id: form_id
};
Bird.tracker.web.formViewed(properties, event_opts);
```

{% endtab %}
{% endtabs %}

#### WebFormViewedProperties

| Property  | Type   |
| --------- | ------ |
| form\_id? | String |
| step\_id? | String |

### formSubmitted()

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

```kotlin
val properties = WebFormSubmittedProperties(
    formId = formId
)
bird.tracker.web.formSubmitted(properties)
```

{% endtab %}

{% tab title="Swift" %}

```swift
let properties = WebFormSubmittedProperties(
    formId: formId
)
bird.tracker.web.formSubmitted(properties)
```

{% endtab %}

{% tab title="Web" %}

```javascript
const properties: WebFormSubmittedProperties = {
    form_id: form_id
};
Bird.tracker.web.formSubmitted(properties, event_opts);
```

{% endtab %}
{% endtabs %}

#### WebFormSubmittedProperties

| Property  | Type   |
| --------- | ------ |
| form\_id? | String |
| step\_id? | String |

### searchSubmitted()

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

```kotlin
val properties = WebSearchSubmittedProperties(
    searchQuery = searchQuery
)
bird.tracker.web.searchSubmitted(properties)
```

{% endtab %}

{% tab title="Swift" %}

```swift
let properties = WebSearchSubmittedProperties(
    searchQuery: searchQuery
)
bird.tracker.web.searchSubmitted(properties)
```

{% endtab %}

{% tab title="Web" %}

```javascript
const properties: WebSearchSubmittedProperties = {
    search_query: search_query
};
Bird.tracker.web.searchSubmitted(properties, event_opts);
```

{% endtab %}
{% endtabs %}

#### WebSearchSubmittedProperties

| Property                | Type   |
| ----------------------- | ------ |
| search\_query?          | String |
| search\_results\_count? | Number |
