Setup without the cookie banner
This 6Kb version tracks everyone without asking permission. This is a legal risk because all analytics needs a banner. However, you might want to use this version in certain scenarios such as when you already have an existing banner system in place.
Paste this code on your website's HTML source code to get the no-banner version up and running:
You can see two configuration variables on the script tag:
The analytics token you receive after creating a new project. This is required. Tracking is disabled if there is no token.
This standard script- tag attribute ensures that the script will be fetched in parallel to parsing and evaluated as soon as it is available. That is: the script won't block the execution of the page and makes the UI render faster.
cookieless=true to the embed code. Like this:
We added this option because many of our users don't like the idea of using cookies for one reason or another. However omitting cookies doesn't mean that the setup is more privacy-friendly: you still need to display the cookie banner.
Setup with the cookie banner
This 8Kb version displays a consent banner for European visitors. The banner is invisible outside Europe. This is the correct way to use analytics.
Here's the embed code:
Cookie banner configuration
Here are all the available options:
The analytics token you receive after creating a new project. This is required.
The label of the “no” button in the consent dialog. The setting is remembered during all the page loads on a visit. Default value: “Not now”
The label of the “yes” button in the consent dialog. This setting is remembered forever. Default value: “Yes”
Whether the default CSS styling should be applied on the popup. Setting this to
false allows you to style the dialog from scratch. Defaults to
true and minimal default styling are applied. You can override the default styles with your CSS.
Tracking custom events
Volument collects traffic and engagement data automatically, but all custom events like button clicks or video playback starts must be tracked manually. This happens with
These events are shown on the UI as follows:
A good event name is something that makes sense on a trend box like above.
Conversions are special kinds of custom events where the visitor is elevated to a higher level on the customer journey. For example when an anonymous visitor joins a mailing list and becomes a “contact”. Or when a visitor contacts sales and turns into a “lead”. The following methods are provided:
Call this method when the visitors join your mailing list and hand in their email addresses.
Call this method when the visitor becomes a sales lead by contacting sales and handing in their contact information.
Call this method when the visitor starts using your product.
Call this method when the visitor converts to a customer by handing their payment information such as the credit card and no money is paid on the spot.
Call this method when the visitor converts to a promoter by inviting her friends or other associates to your product.
Custom conversion events
The above conversion types are “universal”: ie. they are well-known and suit all kinds of projects regardless of the business model or industry. However, you might have some custom conversion types that won't fit the above calls. In this case, you'll use the more general
volument.convert(type) call. For example:
Content tagging is a powerful way to know more about your content and visitors. For example, you can tag your content with a
subject tag to understand which subjects or topics work best for your audience. Here's how they look on the UI:
Content tags are standard HTML meta tags on your page's source code. For example:
Most content management systems allow editing of HTML meta tags. In WordPress for example, you have a Meta tag manager plugin or you can tweak your static site generator (SSG) to insert meta tags from the Markdown front matter.
Here are all the meta tags that Volument uses to enrich your analytics:
The subject or topic of the page
The type of content. Good example values include “article”, “product”, “index”, “podcast”, “webinar”
The intended target audience such as “developers” or “designers”
Variants offer a way to make content or design experiments and measure their impact on engagement. You could, for example, take away the sidebar for some customers and set variant metadata to “No sidebar”. You can have one or more experiments running on the page simultaneously.
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 track 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.
Google Tag Manager
If you want to setup Volument with GTM, please create a Custom HTML tag with the following embed code:
Set the Triggering to “All pages”.