extLink
Warning
Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don’t know these languages, contact your website developer or webmaster.
Sending information about external link traffic.
The data collected is used for generating click maps and Outbound clicks reports.
ym(XXXXXX, 'extLink', url[, options]);
Parameter |
Default value |
Type |
Description |
|
— |
String |
The URL of the destination page |
|
— |
Object |
|
|
|||
|
Type: Function |
— |
The callback function called after sending data about a file download |
|
— |
Object |
Context accessed by the |
|
— |
Object |
Session parameters |
|
|
String |
Title of the current page |
Fields for the |
|||
|
— |
Double |
Revenue by goal. You can set the cost in a currency or conventional units. |
|
— |
String |
Use this field if you want to pass the goal cost in currency. Yandex Metrica recognizes a three-letter ISO 4217 currency code. If a different currency is passed, null values are sent instead of currencies and amounts. |
* Required parameter.
Example
ym(XXXXXX, 'init', {}); //... ym(XXXXXX, 'extLink', 'https://yandex.com');
Revenue by goal
If an outbound click is one of the goals configured on your website, you can transmit the revenue in the method parameters. Details about revenue by goal
Example:
var goalParams =
{
order_price: 1000.35,
currency: "RUB"
};
ym(XXXXXX, 'extLink', 'https://yandex.com', goalParams)
Useful links |
Online training |
* Required parameter.