Title: What is the cookie code?
Last modified: November 29, 2023

---

# What is the cookie code?

 *  Resolved [wally2010](https://wordpress.org/support/users/wally2010/)
 * (@wally2010)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/what-is-the-cookie-code/)
 * Hello.
   In order to use Koko’s optional cookie (the only one I use on my website),
   I have to use a Cookie Consent and Acceptance plugin where the visitor can accept
   or reject.In all of them they ask me to add in a section a code of the cookie
   that I am going to use in the Head or Body. My knowledge is very basic. Is it
   just copying and pasting this line?:
 * **__koko_analytics_pages_viewed**
 * Or is it another type of code?
   When copying it into the Cookie Acceptance plugin
   and so that there is no duplication of codes, should I delete this code if it
   is somewhere within the Koko plugin?
 * Thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwhat-is-the-cookie-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/what-is-the-cookie-code/#post-17240711)
 * If they are asking for the cookie name, that would indeed be it. 
   Maybe you can
   show me a screenshot of where they ask you to fill it, or even better share a
   link to the documentation of the plugin you are using so I can have a better 
   idea of what they want you to fill there. Note that Koko would work well without
   cookies as well, and that you can turn of the cookie in the Koko settings. Kind
   regards,
 *  Thread Starter [wally2010](https://wordpress.org/support/users/wally2010/)
 * (@wally2010)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/what-is-the-cookie-code/#post-17241708)
 * Estas son las capturas de pantalla de los dos complementos que puedo usar para
   aceptar o rechazar cookies donde me piden que inserte el código de los que estoy
   usando.
 * Es en estas ventanas donde te pregunté qué código de la cookie Koko debo insertar
   para cumplir con la regla.
 * [https://unafotografiayunviaje.com/cookie-notice-and-compliance-for-gdprccpa/](https://unafotografiayunviaje.com/cookie-notice-and-compliance-for-gdprccpa/)
 * [https://unafotografiayunviaje.com/wp-content/uploads/2023/11/GDPR-Cookie-Compliance-Plugin-CCPA-ready.jpg](https://unafotografiayunviaje.com/wp-content/uploads/2023/11/GDPR-Cookie-Compliance-Plugin-CCPA-ready.jpg)
    -  This reply was modified 2 years, 6 months ago by [wally2010](https://wordpress.org/support/users/wally2010/).
 *  Plugin Support [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/what-is-the-cookie-code/#post-17241944)
 * Under Dashboard > Analytics > Settings, set “Use cookie to determine unique visitors
   and pageviews?” to No, that will disable the cookie by default. 
   Then in the 
   Head/Header add this code that will enable the cookie again:
 *     ```wp-block-code
       <script>koko_analytics.use_cookie = true;</script>
       ```
   
 * Hope that helps. If you have any questions, please let me know!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘What is the cookie code?’ is closed to new replies.

 * ![](https://ps.w.org/koko-analytics/assets/icon.svg?rev=2980600)
 * [Koko Analytics - Privacy-Friendly WordPress Analytics](https://wordpress.org/plugins/koko-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/koko-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/koko-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/koko-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/koko-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/koko-analytics/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Lap](https://wordpress.org/support/users/lapzor/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/what-is-the-cookie-code/#post-17241944)
 * Status: resolved