--- title: "Managing Cookie Consent" slug: "managing-cookie-consent" updated: 2020-05-06T16:09:01Z published: 2020-05-06T16:09:01Z canonical: "onpremises.webtrends.help/managing-cookie-consent" --- > ## Documentation Index > Fetch the complete documentation index at: https://onpremises.webtrends.help/llms.txt > Use this file to discover all available pages before exploring further. # Managing Cookie Consent ## Managing Cookie Consent In response to the EU Privacy Act, Webtrends provides options to configure cookie types and behaviors in your JavaScript tag. These enable your visitors to consent to, or decline, cookies. You can add `cookieTypes`, `FPCConfig` and `TPCConfig` settings to the `webtrends.js` file to set the cookie level of the tag, and configure first-party cookies and third-party cookies. For a summary of possible configurations, see Cookie States and Tracking Behavior. #### cookieTypes **cookieTypes** is a string that specifies the type of cookies the tag should use. `cookieTypes : {"firstPartyOnly"|"none"|"all"}` To configure **cookieTypes** in `webtrends.js`: ```javascript dcs.init({ dcsid: "dcs9x99xxxx9xxx9xx9xxxx9x_9x9x", timezone: -7, cookieTypes: "all" }); ``` #### FPCConfig The **FPCConfig** object provides optional settings for first-party cookie configuration options. `FPCConfig : "enabled","domain","name","expires"` *enabled* - `true` or `false` :::(Info) (Note) This setting is now preferred over the `disablecookie` setting for enabling or disabling third party cookies, though `disablecookie` is still supported. ::: *domain* - The first-party cookie domain. :::(Info) (Note) This setting is now preferred over the `fpcdom` setting for the first party cookie domain attribute, though `fpcdom` is still supported. ::: *name* - The name of the first-party cookie. :::(Info) (Note) This setting is now preferred over the `fpc` setting for the first party cookie name, though `fpc` is still supported. ::: *expires* - Number of milliseconds for which the first-party cookie is valid. :::(Info) (Note) Setting `expires` to 0 sets a session-only cookie. This setting is now preferred over the `cookieexpires` setting for session-only first party cookies, though `cookieexpires` is still supported. ::: To configure **FPCConfig** in `webtrends.js`: ```javascript dcs.init({ dcsid: "dcs9x99xxxx9xxx9xx9xxxx9x_9x9x", timezone: -7, FPCConfig: { enabled: true, domain: ".webtrends.com", name: "customFPCName", expires: 0 //Session only } }); ``` #### TPCConfig The **TPCConfig** object provides optional settings for third-party cookie configuration options. `TPCConfig : "enabled","domain","name","expires"` *enabled* - `true` or `false` *cfgType* - If present, this value is passed along as the value for the `dcscfg` parameter, which instructs the collection server on how to handle third party cookies. If third party cookies are disabled, this value will automatically be set to 1. `dcscfg` parameter values are: Disable cookie processing : 1 Disable first-time cookie detection: 2 Enable session cookies: 4 To configure **TPCConfig** in `webtrends.js`: ```javascript dcs.init({ dcsid: "dcs9x99xxxx9xxx9xx9xxxx9x_9x9x", timezone: -7, TPCConfig: { enabled: true, cfgType: "2" } }); ```