🎉 Black Friday Deal! Get 30% off your first year (or month) with the code BF2025


Integrate Vemetric into your WordPress website

Easily integrate Vemetric into your WordPress website.


WordPress is a popular CMS for building websites.

We published a WordPress plugin that allows you to easily integrate Vemetric into your WordPress website. Follow the steps below to get started.

Installation

Install the plugin

You can install the Vemetric Plugin via your Admin Dashboard in WordPress. Navigate to Plugins > Add Plugin and search for Vemetric.

Screenshot of the WordPress Plugin installation

Configure your Token

Once you’ve installed the plugin, you can configure your project token in the plugin settings. Navigate to Settings > Vemetric and enter your project token (found in the settings of your Vemetric project).

Screenshot of the WordPress Plugin settings

You can also configure all the other settings you see on the Screenshot. Refer to the HTML Script Docs for more details about the available options.

Verify installation

Once you’ve added your token and saved the settings, Vemetric will automatically start tracking page views on your site (each page load will be recorded). You can verify this by checking your Vemetric dashboard for incoming pageview events a few seconds after loading a page.

Data from localhost won’t be tracked.

Keep in mind that one project can be used to track data from multiple websites, which can be useful when you for example want to track users across your landing page and web application. We’ve also created a guide on how to track data across subdomains.

Optional: Track custom events and identify logged-in users

You can either track custom events via data attributes on elements, or by interacting with the vemetric object on the window.

You can track custom events by adding data-vmtrc attributes to any HTML element.

<button data-vmtrc="MyCustomEvent">Click me</button>

Look at the data attributes docs for more information.

Also learn more about User Identification to track authenticated users and see their full journey.

Further integrations

The WordPress plugin also initiates the PHP SDK for tracking events in your PHP code. It exposes a global function vemetric which returns a new instance of the Vemetric Client. Here’s an example:

<?php
$vm = vemetric();
$vm->trackEvent('SignupCompleted', [
    'userIdentifier' => 'your-user-identifier',
    'eventData'      => ['plan' => 'Pro'],
    'userData'       => ['setOnce' => ['signupSource' => 'landing-page']],
]);

Easily integrate Vemetric using Google Tag Manager.

Easily integrate Vemetric into your Next.js application.

Ready to understand your users?

Start tracking
Pricing About Documentation Changelog Blog
200 stars