Leverage cookies
In additional to the ChainvineClient operations, we offer a few global utility methods to assist in keeping track of referrals through the use of cookies.
Note: these operations rely on browser functionality and will throw an error if used in a non-browser context
Storing a Referrer
Should you already have a reference to he referrer's ID or if you would like to adjust the cookies expiration you may do so by providing overrides as below:
Fetching a stored Referrer
Once you've stored the referrer, you can access it at any point in your application like so:
Clearing the stored Referrer
The referrer cookie can be cleared at any point using the following operation:
Last updated