hit
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]).
Manually sending pageview data for AJAX and Flash sites.
ym(XXXXXX, 'hit', url, [title[, referer[, params]]]);
Parameter |
Default value |
Type |
Description |
|
— |
String |
Current page URL |
|
|
String |
Page titles |
|
— |
String |
The URL of the page that the user loaded the current page contents from |
|
— |
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 a /
, 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', 'Contact information');
Example
ym(XXXXXX, 'init', {}); //... ym(XXXXXX, 'hit', '#!contacts', 'Contacts', 'http://example.com/#!main');
Useful links |
Online training |
* Required parameter.