# @amplitude/plugin-page-url-enrichment-browser

Latest version **0.7.28** (published 2026-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @amplitude/plugin-page-url-enrichment-browser
pnpm add @amplitude/plugin-page-url-enrichment-browser
yarn add @amplitude/plugin-page-url-enrichment-browser
bun add @amplitude/plugin-page-url-enrichment-browser
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.7.28 |
| Published | 2026-09-25 |
| First published | 2025-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 180 |
| Author | Amplitude Inc |
| Maintainers | curtisbliu, kelson.warner, sdk.dev, eric_amplitude, daniel-graham-amplitude, jjwang123 |

## Links

- npm: https://www.npmjs.com/package/@amplitude/plugin-page-url-enrichment-browser
- Repository: https://github.com/amplitude/Amplitude-TypeScript
- Issues: https://github.com/amplitude/Amplitude-TypeScript/issues
- npm.io page: https://npm.io/package/@amplitude/plugin-page-url-enrichment-browser

## Recent versions

- 0.7.28 (latest) — 2026-09-25
- 0.7.27-video-analytics-5.0 (video-analytics-5) — 2026-09-22
- 0.7.26-video-analytics-4.0 (video-analytics-4) — 2026-09-17
- 0.7.25-video-analytics-2.0 (video-analytics-2) — 2026-09-09
- 0.7.23-video-analytics.0 (video-analytics) — 2026-07-31
- 0.7.14-featelement-selector-v1.0 (featelement-selector-v1) — 2026-06-15
- 0.7.13-SR-4497-custom-transport-hooks.0 (SR-4497-custom-transport-hooks) — 2026-06-09
- 0.7.12-sr-perf-reliability-rc.0 (sr-perf-reliability-rc) — 2026-06-05
- 0.7.12-sr-4646-rc.0 (sr-4646-rc) — 2026-06-03
- 0.7.10-sr-idb-multitab-test-rc.0 (sr-idb-multitab-test-rc) — 2026-05-04
- 0.7.7-sr-3531-rc-2.0 (sr-3531-rc-2) — 2026-04-20
- 0.7.5-SR-3115-rc2.0 (SR-3115-rc2) — 2026-04-08
- 0.7.5-SR-3115-rc1.0 (SR-3115-rc1) — 2026-04-03
- 0.7.5-SR-3115.0 (SR-3115) — 2026-04-03
- 0.6.8-SR-2728.0 (SR-2728) — 2026-03-12
- … 89 more at https://npm.io/package/@amplitude/plugin-page-url-enrichment-browser/versions

## README

<p align="center">
  <a href="https://amplitude.com" target="_blank" align="center">
    <img src="https://static.amplitude.com/lightning/46c85bfd91905de8047f1ee65c7c93d6fa9ee6ea/static/media/amplitude-logo-with-text.4fb9e463.svg" width="280">
  </a>
  <br />
</p>

# @amplitude/plugin-page-url-enrichment-browser

Official Browser SDK plugin for page url enrichment

## Installation

This package is published on NPM registry and is available to be installed using npm and yarn.

```sh
# npm
npm install @amplitude/plugin-page-url-enrichment-browser

# yarn
yarn add @amplitude/plugin-page-url-enrichment-browser
```

## Usage

This plugin works on top of Amplitude Browser SDK and adds page url enrichment properties to all events. To use this plugin, you need to install `@amplitude/analytics-browser` version `v2.0.0` or later.

### 1. Import Amplitude packages

* `@amplitude/plugin-page-url-enrichment-browser`

```typescript
import { pageUrlEnrichmentPlugin } from '@amplitude/plugin-page-url-enrichment-browser';
```

### 2. Instantiate page url enrichment plugin
```typescript
const pageUrlEnrichment = pageUrlEnrichmentPlugin();
```

#### Options


### 3. Install plugin to Amplitude SDK

```typescript
amplitude.add(pageUrlEnrichment);
```

### 4. Initialize Amplitude SDK

```typescript
amplitude.init('API_KEY');
```

## Resulting Page URL properties

This plugin adds Page URL properties to all events based on your configuration

#### Event type
* No event type added

#### Event properties

| Property                               | Description                                                                                                                                                          |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `'[Amplitude] Page Domain'`            | The website's hostname or `location.hostname`                                                                                                                        |
| `'[Amplitude] Page Location'`          | The website's full url or `location.href`                                                                                                                            |
| `'[Amplitude] Page Path'`              | The website's pathname or `location.pathname`                                                                                                                        |
| `'[Amplitude] Page Title'`             | The website's title or `document.title`                                                                                                                              |
| `'[Amplitude] Page URL'`               | The website's url excluding query parameters                                                                                                                         |
| `'[Amplitude] Previous Page Location'` | The URL of the previous page the user visited; document.referrer if coming from an external domain; and using the sessionStorage which tracks the last url otherwise |
| `'Amplitude] Previous Page Type'`      | A classification of the previous page (e.g., 'Internal', 'External', 'Direct'), typically derived from a custom function that analyzes the previous page's URL       |

---
_Source: https://npm.io/package/@amplitude/plugin-page-url-enrichment-browser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
