Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hising authored Jan 3, 2024
1 parent 22c8af3 commit 2f279e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ npm install use-utm
```
## Usage

### `utm(url: string): UtmParameters`
##### `utm(url: string): UtmParameters`

```javascript
import { utm } from 'use-utm';
Expand All @@ -22,7 +22,7 @@ const {
} = utm(window.location.href);
```

### `addUtm(url: string, utmParams: UtmParameters): string`
##### `addUtm(url: string, utmParams: UtmParameters): string`

```javascript
import { addUtm } from 'use-utm';
Expand All @@ -36,15 +36,15 @@ const utmParams = {
const urlWithUtmParams = addUtm(url, utmParams);
```

### `removeUtm(url: string): string`
##### `removeUtm(url: string): string`

```javascript
import { removeUtm } from 'use-utm';
const url = "https://www.example.com/?utm_source=google&utm_medium=cpc&utm_campaign=summer";
const urlWithoutUtmParams = removeUtm(url);
```

### `useUtm(): UtmParameters`
##### `useUtm(): UtmParameters`

```javascript
import { useUtm } from 'use-utm';
Expand All @@ -61,4 +61,4 @@ const Component = () => {
</div>
);
};
```
```

0 comments on commit 2f279e9

Please sign in to comment.