# Intercept & control RUM events with URL blueprinting

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Frum%2Fsdk-features%2Fintercept-and-control-rum-events-with-url-blueprinting.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Frum%2Fsdk-features%2Fintercept-and-control-rum-events-with-url-blueprinting.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

The RUM Browser SDK captures RUM logs and events and populates their main attributes. **URL Blueprinting** gives you access to every event page or network URL collected by the RUM SDK. It allows you to modify its fields using custom-defined functions and then easily aggregate your data once ingested by Coralogix.

## Overview[​](#overview "Direct link to Overview")

Intercepting the RUM events allows you to:

* Modify event page or network URL fields using custom-defined functions

* Aggregate errors RUM events across URLs with different domains, subdirectories, paths, queries, or parameters

For example, URL blueprinting allows you to capture all shoe-related events on an e-commerce site using `https://www.store.com/shop/shoes/<shoe-id>`, without specifying a specific shoe ID.

## Configuration[​](#configuration "Direct link to Configuration")

```
import { CoralogixRum } from '@coralogix/browser';



CoralogixRum.init({

  // ...

  urlBlueprinters: {

    pageUrlBlueprinters: [

      (url) => {

        const hostnameParts = new URL(url).hostname.split('.');

        hostnameParts[0] = '{team-id}';

        return 'https://' + hostnameParts.join('.');

        // "https://alpha.company.com" => "https://{team-id}.company.com"

      },

    ],

    networkUrlBlueprinters: [(url) => url.replace('api/v1', '{server}')]

    // "https://path/api/v1/logs" => "https://path/{server}/logs"

  },

});
```
