setLinkClasses
The setLinkClasses() method sets a list of CSS classes that should be tracked as outlinks (not downloads). Downloads are clicks on links to downloadable files. Outlinks are clicks on links to external websites (different domain).
Syntax
setLinkClasses(classes)
setLinkClasses(classes): void
setLinkClasses(classes): void
setLinkClasses(classes): void
setLinkClasses(classes): void
setLinkClasses(classes): void
setLinkClasses(classes): void
Parameters
classes (string | array, required)
The name of the CSS class to be tracked as an outlink (not a download).
Examples
To track as outlinks elements tagged with the this-is-an-outlink CSS class:
_paq.push(["setLinkClasses", "this-is-an-outlink"]);
setLinkClasses("this-is-an-outlink"): void
setLinkClasses("this-is-an-outlink"): void
setLinkClasses("this-is-an-outlink"): void
setLinkClasses("this-is-an-outlink"): void
setLinkClasses("this-is-an-outlink"): void
setLinkClasses("this-is-an-outlink"): void
Notes
- Elements tagged with the piwik-link or piwik_link class are always treated as outlinks.
Related methods
Updated 6 days ago