---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/metrica/en/objects/hit-url-title-referer.md
  - https://yandex.com/support/metrica/es/objects/hit-url-title-referer.md
  - https://yandex.com/support/metrica/pt/objects/hit-url-title-referer.md
  - https://yandex.com/support/metrica/ru/objects/hit-url-title-referer.md
  - https://yandex.com/support/metrica/tr/objects/hit-url-title-referer.md
  - https://yandex.com/support/metrica/zh/objects/hit-url-title-referer.md
  - href: en/objects/hit-url-title-referer.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/metrica/en/llms.txt

# hit

{% note alert %}

This signature is outdated. It’s supported for backward compatibility, but may be deprecated at any time. We strongly discourage its use. Use [hit (url[, options])](https://yandex.com/support/metrica/en/objects/hit.md).

{% endnote %}

Manually sending pageview data for AJAX and Flash sites.

```javascript
ym(XXXXXXXX, 'hit', url, [title[, referer[, params]]]);
```


#|
||
**Parameter**
|
**Default value**
|
**Type**
|
**Description**
||
||
`url`[*](*Параметр)
|
—
|
String
|
Current page URL
||
||
`title`
|
`document.title`
|
String
|
Page titles
||
||
`referer`
|
—
|
String
|
The URL of the page that the user loaded the current page contents from
||
||
`params`
|
—
|

|
Session parameters
||
|#

<sup >*</sup> Required parameter.

The `url` and `referer` parameters allow using URL paths without the schema (protocol) and host.

In this case, if a path starts with a `/`, the URL is assumed to be set from the root of the host.

```javascript
ym(XXXXXXXX, 'hit', '/contacts');
```

Otherwise, the path is assumed to be relative to the current page.

```javascript
ym(XXXXXXXX, 'hit', 'contacts', 'Contact information');
```

> # Example
> 
> ```javascript
> ym(XXXXXXXX, 'init', {});
> //...
> ym(XXXXXXXX, 'hit', '#!contacts', 'Contacts', 'http://example.com/#!main');
> ```

<!-- source: en/_includes/buttons/chat-button.md -->
[Chat with us](https://yandex.com/chat/#/user/036e6a02-3620-9cdc-4c5e-a34667a7379e?utm_source=spravka){.button}

<!-- source: en/_includes/styles/href-to-button.md -->

<!-- endsource: en/_includes/styles/href-to-button.md -->
<!-- endsource: en/_includes/buttons/chat-button.md -->

<!-- source: en/_includes/footer-links.md -->
- - -

<div class="borderless-table">

#|
||
Useful links

- [Demo tag](https://metrica.yandex.com/r/dashboard?)
- [Add a tag](https://metrica.yandex.com/add/)
- [Free tag setup](https://yandex.com/promo/freeservice/metrica?utm_source=help_metrica_en&utm_medium=cpc&utm_campaign=1)
- [Yandex Metrica API](https://tech.yandex.com/metrika/)
- [Suggest your idea](https://yandex.com/support/metrica/troubleshooting/idea.html)
- [Discuss in Telegram](https://t.me/yandexmetrika)
|
Online training

- [Get a Yandex Metrica certificate](https://yandex.ru/adv/expert/exam/metrika/?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)


- [Take a training course](https://yandex.com/adv/edu/online/metrika?utm_source=metrika_help&utm_medium=web&utm_campaign=static&utm_content=useful_links)

||
|#

</div>

<!-- source: en/_includes/styles/table-style.md -->

<!-- endsource: en/_includes/styles/table-style.md -->
<!-- endsource: en/_includes/footer-links.md -->

[*Параметр]: <sup >*</sup> Required parameter.