clickmap

Alert

Outdated method. Supported for backward compatibility, but may be deprecated at any time. We strongly discourage its use.

To manage collection of click data, use the clickmap parameter during tag initialization.

Managing collection of information for generating click maps.

ym(XXXXXX, 'clickmap', properties);

Parameter

Default value

Type

Description

properties*

Boolean

Object

By default, information is collected about all clicks on the page.

You can disable click tracking by setting the parameter to false.
javascript ym(XXXXXX, ’clickmap’, false);
The specified click tracking parameters (“Object” type) are remembered. So if click tracking was disabled, calling clickmap(true) will start tracking clicks again using the parameters that were specified earlier.

Fields of the properties object

properties.filter

Function

Click filtration for specific DOM elements

properties.ignoreTags

String[]

A list of HTML tags to not track clicks for

properties.quota

Number

Maximum number of tracked clicks on a page

* Required parameter.

Example

ym(XXXXXX, 'init', {});
ym(XXXXXX, 'clickmap', {
    mode: 'default',
    quota: 1,
    delay: 10,
    ingoreTags: ['input', 'textarea'],
    filter: function(domElement) {
        if (
               domElement.className == 'menu-item'
               ||
               domElement.id == 'footer'
           ) {
            return false; // Ignore click
        }
        return true;
    }
});

You can also disable click tracking using the ym-disable-clickmap class.

Chat with us

Write an email

Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.


* Required parameter.