hit

Attention. This signature is outdated. Supported for backward compatibility, but may be deprecated at any time. We strongly discourage its use. Use hit (url[, options]).
Manually sending pageview data for AJAX and Flash sites.
ym(XXXXXX, '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

* 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 the / symbol, the URL is assumed to be set from the root of the host.

ym(XXXXXX, 'hit', '/contacts');

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

ym(XXXXXX, 'hit', 'contacts', 'Contacts');

Example

ym(XXXXXX, 'init', {});//...ym(XXXXXX, 'hit', '#!contacts', 'Contacts', 'http://example.com/#!main');