Custom Tags

Custom Tags

By default, Request Metrics stores page performance metrics per URL. If you have hundreds or thousands of different URLs, this may not be an optimal way to see your performance data. Often it’s nice to see performance data for certain pages grouped together in the UI.


Learn more about Performance in our Definitive Guide to Web Performance


Your Data, Your Way, With Tags

When you initialize the Request Metrics script, you can tell us more about your page with custom tags.

If you are using the script tag to initialize Request Metrics, just include the data-rm-tags attribute with a comma separated list of strings:

<script async src="https://cdn.requestmetrics.com/agent/current/rm.js"
        data-rm-token="YOUR_SITE_TOKEN"
        data-rm-tags="product-details,computers,version 1.45"
        ></script>

These tags can be anything that makes sense in the context of your site. Maybe it’s the product category the user is visiting. Maybe it’s an A/B test experiment identifier. Maybe it’s which team is responsible for this page. You can have more than one per page too!

If you prefer manual script installation or you’re using NPM, you can include an array of strings when calling the install function:

<script src="https://cdn.requestmetrics.com/agent/current/rm.js"></script>
<script>
  // Once you are *sure* the Request Metrics agent script has been loaded
  window.RM && RM.install({
    token: "YOUR_SITE_TOKEN",
    tags: ["Conversion Test: A", "new-mobile-layout"]
  });
</script>

Tags in the UI

You’ll start seeing your tag groups almost immediately. They live in the UI alongside page URLs. They sort the same way too, letting you see where a tag sits in relation to individual URLs and other tags.

Tags inline in the list with page URLs

When you click on a tag in a list, you’ll be taken to the same kind of details page with the same level of data as an individual URL. It will just be rolled up and aggregated from all pages that contain that tag.

Filtering Lists

Sometimes you might not want to see tags at all. Or maybe you only want to see tags! You can change what shows up in the list by adjusting the dropdown menu on the global filter bar.

Filter to just pages or tags or show everything.

You can also use the list filter and global search to find tags by search term.

What Should You Use Tags For?

Anything you want! Some possible examples:

  • Which version of an A/B test is running
  • Which team is responsible for this page
  • Are there third party ads being loaded on a page?
  • Which version of a codebase is serving the page
  • Which datacenter is serving the page

They exist for you to group your page performance data in any way that makes sense for your use case!

The Fine Print

You can have 100 tags per site. There’s no need to delete old tags as we delete old or rarely used ones when the limit is reached. Tags can pretty much be any string you want, but there’s a 100 character limit per tag.

Let us know if you like the feature, or have any questions!