Skip to content

Tracking script installation

Install our lightweight tracking script and begin monitoring website visitors, traffic sources, and conversions.

To start collecting data with GoodMetrics, you’ll need to install a small tracking script on your website. This script enables GoodMetrics to track pageviews and custom events in real time.

When you create a new account, your unique tracking script is shown during onboarding. If you’ve already completed onboarding or added another website, here’s how to retrieve your script.

To install the GoodMetrics tracking script, copy your unique tracking code and add it to your website. We recommend placing it in the <head> section.

Your tracking script will look something like this:

<script id="gmScript" data-gm="XXXXXXXX" src="https://cdn.goodmetrics.io/goodmetrics.min.js"></script>

💡 This is just an example. Your data-gm ID will be unique, so make sure to copy your script tag directly from your site settings.

Once installed, your script will begin sending pageview and event data to GoodMetrics in real time.

After installing the script, follow these steps to confirm it’s working:

  1. Visit your website (where you installed the tracking script).
  2. In GoodMetrics, open the Realtime report.
  3. Confirm that your visit appears in the report.

If you don’t see your visit:

  • Review the steps above and verify that you copied your script correctly.
  • Double-check that the script is present in the <head> section of your website.
  • Still stuck? Contact us and we’ll be happy to help.

Using a tag manager or a specific platform?

Section titled “Using a tag manager or a specific platform?”

If you deploy tags through Google Tag Manager, or you’re installing GoodMetrics on a specific platform, see our Integrations & Setup Guides for step-by-step instructions.