Title: &#8220;When cookie is set&#8221;
Last modified: June 6, 2020

---

# “When cookie is set”

 *  Resolved Anonymous User 17612203
 * (@anonymized-17612203)
 * [6 years ago](https://wordpress.org/support/topic/when-cookie-is-set/)
 * I have a cookie note on my website and set CAOS tracking to “When cookie is set”.
   Also I defined the cookie name from my cookie note plugin.
 * When I load the website, the analytics code will not shown… PERFEKT
    When I accept
   the cookie note, the cookie note cookie is set… PERFEKT
 * …but the analytics cookies are not set at this moment! I need to refresh the 
   site or click on a link to get the analytics cookies (_ga and _gid) set.
 * Is there any chance to get the analytics cookies set when the cookie note cookie
   is set, means without any refresh or click?

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

 *  Thread Starter Anonymous User 17612203
 * (@anonymized-17612203)
 * [6 years ago](https://wordpress.org/support/topic/when-cookie-is-set/#post-12947758)
 * The reason behind my request is, that I have manyuse who reach my site through
   a deep link. They read the article an leave the site, so often no more page views.
   If If I set it to “when cookie is set” now I think this user will not be counted
   by Google Analytics… right?
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/when-cookie-is-set/#post-12985426)
 * I’m sorry, but that’s just how a browser (and a cookie) works. Doesn’t your Cookie
   Notice plugin offer an option to refresh the browser window after the Cookie 
   Notice has been accepted?
 * Sadly, there’s nothing I (or CAOS) can do about this.

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

The topic ‘“When cookie is set”’ is closed to new replies.

 * ![](https://ps.w.org/host-analyticsjs-local/assets/icon-256x256.png?rev=3307068)
 * [CAOS | Host Google Analytics Locally](https://wordpress.org/plugins/host-analyticsjs-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-analyticsjs-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-analyticsjs-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-analyticsjs-local/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [5 years, 12 months ago](https://wordpress.org/support/topic/when-cookie-is-set/#post-12985426)
 * Status: resolved