Setting up Volument
To install Volument, paste the following code on your pages:
Imporant: Replace “your_token” with the actual token that you can get from your account.
After the code is in place, Volument starts measuring how your visitors engage with the site.
Volument automatically collects engagement and retention information. However, all the key conversion events, like registrations and purchases, must be wired programmatically. This happens by calling the following methods on the right spot on your code:
Call this method when the visitor becomes a “lead.“ That is: they hand their email or phone number so you have a way to reach them.
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 hands their payment information and pays the given amount in your local currency. The visitor is converted to a customer so no additional convertToCustomer call is needed.
Call this method when the visitor invites her friends or other associates to your product contributing to the viral growth of your product. The visitor is converted to a “promoter”.
Areas and topics
Volument is good at extracting area and page information from your URLs. For example
/blog/introducing-volument translates to “blog” area and “introducing-volument” topic. It's impossible to get these right all the time because websites are different. However, you can configure Volument to understand your special website structure.
areas configuration option specifies the areas on your website that you want to have a separate analysis. For example
parser option specifies a custom parser to extract areas and topics from your paths. Here's an example parser that would work nicely for Twitter.
If your site is a single-page application (SPA) and routing is built around
pushState (PJAX, Turbolinks, or similar) you can setup Volument as follows:
After this you must track all page switches with
volument.route() method, for example:
In fact, this website is built as a single-page application so we can provide faster page loads for our visitors.
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 when not given.
You can disable tracking with
disabled option as follows:
It makes sense to disable tracking in a development environment or when navigator.doNotTrack is enabled on the end user's browser.
When tracking is disabled no data is sent to our servers.