clickmap

Attention.

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

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 sending the false value to the parameter.

ym(XXXXXX, 'clickmap', false);

Click tracking parameters (the Object type) are remembered. So if click tracking was disabled, when clickmap(true) is called, click collection is performed according to the previously set parameters.

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.