enableCookies

The enableCookies() method enables the setting of the visitor cookie (_pk_id.*) and the session cookie ( _pk_ses.*), which are responsible for recognizing visitors and their sessions. These cookies are set on the next event after this method is called.

Syntax

enableCookies()
enableCookies(): void
enableCookies(): void
enableCookies(): void
enableCookies(): void
enableCookies(): void
enableCookies(): void

Examples

To enable the setting of visitor and session cookies:

_paq.push(["enableCookies"]);
enableCookies(): void
enableCookies(): void
enableCookies(): void
enableCookies(): void
enableCookies(): void
enableCookies(): void

Notes

  • This method is enabled by default after you install the Piwik PRO container or tracking code.

Related methods