Common Cookie¶
Steps to add user tracking¶
Add these two <script> tags to your html
<script src="https://cdn.com/static/js/commoncookie.js"></script> <script> bhriguCommonCookie.init(cookieName, domainName); bhriguCommonCookie.send(); </script>
Change cookieName and domainName. Details about cookieName and domainName are below.
API Reference¶
init
Method- Sets values used by the send method. It takes 2 arguments:
- cookieName
- Type: string
- Description: name of a cookie that identifies a user on your site
- domainName
- Type: string
- Description: unique name to be used everywhere on the site
- cookieName
send
Method- Sends the values set earlier
Example¶
For www.carwale.com
cookieName = “CWC”
domainName = “carwale”
<script src="https://cdn.com/static/js/commoncookie.js"></script>
<script>
bhriguCommonCookie.init("CWC", "carwale");
bhriguCommonCookie.send();
</script>