Integration Code For Cookie Option


User identification is a necessary part of digital marketing in order to know the activities performed by a specific user on your site or across web environments. It becomes easy to determine that user if he visits your site again or performs any activity.

Therefore, in order to determine a user who made two distinctive hits on any event, a unique ID is assigned to the user. This client ID (NV_UID) gets stored in the browsers’ cookies so that whenever that user further visits your site, he can be easily identified.

Read this article to know the different parameters of cookie rules in NotifyVisitors.


You can identify the unique users across different browsing sessions with the help of NV_UID. If you want to track users across different browsers and devices, you can use your own authentication system such as the user id apart from the client ID to be more accurate with the users’ identification across all the browsers and devices.


NotifyVisitors drops first-party cookies for the following :

  • To differentiate between unique users.

  • To take account of the number and time of previous user visits.

  • To evaluate the beginning and end of a user session.

  • To jot down the value of visitor-level custom variables.

  • To analyze the information regarding the traffic source.

Read below the significant parameters of using cookies in NotifyVisitors :

Cookie Name

NotifyVisitors drop it’s own cookies with the prefix “_nv”.

NotifyVisitors also sends these cookies to it’s own server for further processing.
If you want to use Cookie Rule as a targeting rule for Banners / Personalization, you can pass your own cookies as well.

Call the following method if you want to pick “all” or “selected” cookies respectively :

In order to pick all the cookies, pass “all” via the following method :


In order to pick selected cookies, you can pass the cookie name in array format by following method :

notify_visitors.cookies([“cookie_name”, ...]);

Cookie Domain

Cookies are set at the highest possible domain level. It allows measurement to occur across subdomains without any additional configuration.

For example : If your website address is, NotifyVisitors will set the cookie domain to “”.

Conditions for cookie domain

You can pass the following methods if you want us to drop cookies on a specific domain :

Auto - NotifyVisitors automatically set the cookie domain configuration for you. You need to simply set the string “auto” for the cookieDomain field.

None - Set “none” in the cookie domain to drop the cookie on the complete domain. “”

       cookie_domain: 'none' // set cookie domain. by default we drop cookie on wild domain. if you set 'none' in cookie domain, cookie will be dropped on complete domain

Cookie Expiry

Every time a user hits the event in NotifyVisitors, the cookie expiration time gets updated to the current time plus the value of cookieExpires field.

For example - If you use the default cookieExpires time of 3 years and a user is visiting your site every month, their cookie will never expire.