Docs
Install the snippet
The browser snippet is a 4 KB script that queues events before it finishes loading, so you never lose the first click. Install it once in your base template.
Add the script tag
Paste the tag into the <head> of every page you want to measure, replacing the data-key value with your own publishable key. The async attribute keeps it off the critical rendering path.
<script
async
src="https://cdn.lorem.example/vertex.min.js"
data-key="vx_live_lorem1p5um4d1p1sc1ng3l1t">
</script>Verify the install
Open your site, then open the browser console. The snippet registers a global vertex object and reports its version. If you see undefined, check that the tag is inside <head> and not blocked by a strict Content-Security-Policy.
// In the browser console on your site:
window.vertex && vertex.version;
// => "3.14.0"
vertex.debug(true); // logs every queued event to the consoleSingle-page apps
The snippet records a page view on initial load only. Client-side routers swap content without a full navigation, so call vertex.page() after each route change — most routers expose a hook for exactly this.
router.afterEach(() => {
vertex.page(); // records path, title and referrer
});Ad blockers and proxying
Some blockers filter third-party analytics hosts. If your numbers look 20–30% low, serve the script from your own domain and proxy the collect endpoint — the snippet honours a data-host attribute for this.
Proxying is available on every plan; nothing about it is gated.