setCookieNamePrefix
The setCookieNamePrefix() method renames the prefix used in the visitor cookie (_pk_id.*
) and the session cookie ( _pk_ses.*
). The default prefix is _pk_*
.
Syntax
setCookieNamePrefix(prefix)
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
Parameters
Prefix (string, required)
A new prefix that will replace the default prefix used in the visitor cookie (_pk_id.*
) and the session cookie ( _pk_ses.*
).
Examples
To rename the prefix in the visitor ands session cookies:
_paq.push(\["setCookieNamePrefix", "\_examplePrefix_"]);
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
setCookieNamePrefix(prefix): void
Related methods
- enableCookies()
- disableCookies()
- deleteCookies()
- hasCookies()
- setCookieDomain()
- getCookieDomain()
- setCookiePath()
- getCookiePath()
- setSecureCookie()
- setVisitorCookieTimeout()
- getConfigVisitorCookieTimeout()
- setReferralCookieTimeout()
- setSessionCookieTimeout()
- getSessionCookieTimeout()
- setVisitorIdCookie()
Updated 6 days ago