To install Volument, paste the following code on your HTML pages:
Remember to replace
YOUR_TOKEN with your site-specific unique key that you can get from your account. As soon as this code is in place, you can see visitors appear on the user interface in real-time.
Call this method when the visitors join your mailing list and hand their email address.
Call this method when the visitor beceoms a sales lead by contacting sales and handing their contact infromation.
Call this method when the visitor and converts to a customer by handing their payment information such as the credit card and no money is paid at the spot.
Call this method when the visitor converst to a promoter by inviting her friends or other associates to your product.
Call this method when the visitor hands their payment information and pays the given amount of money in the currency of your choice. The visitor is converted to a customer so no additional convertToCustomer call is needed.
Call this method when the visitor invites the given amount of peers to the site. The visitor is automatically converted to a promoter so no additional convertToPromoter call is needed.
If your site is a single-page application (SPA) and the page change is built around
pushState (PJAX, Turbolinks, or similar) you can use
volument.route() to emulate page switches, for example:
Call this method when the visitor is routed to a new page. After this Volument starts tracking how the new page is consumed. The path argument is optional and
location.pathname is used by default.
This website, for example, is a single-page application. Here's a blog entry about it.
The consent banner
We offer a specialized initialization method,
volument.consent(), to abstract all the complexities in the cookie consent dialogs. Please use the full version of the client volument-full.js (7.4K) in place of the default version volument.js (5.6K) as follows:
The analytics token specific to your project. This is available on your account. Likewise all the configuration variables described above are passed described above are passed directly to volument. This is a required parameter.
The label on the “no” button in consent dialog that disables tracking. Default value: “Not now”
The label on the “yes” button in consent dialog that enables tracking. Default value: “Yes”
The label on the “OK” button on a notice dialog. Default value: “OK”
Whether the default CSS styling should be applied on the popup. Setting this to
false allows you to style the dialog from scratch.
navigator.doNotTrck- setting should disable tracking. This also enables statistics for this setting.
Detecting visitor's country
To show the banner to European visitors only, we must have away to detect where the visitor is coming from. One good way is to use a geo-location service. There are a lot of good services available and many of them are free up to a certain limit. We use ipgeolocation.io as follows: