Skip to content

Commit

Permalink
docs: fix spelling and code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sneko committed Jun 9, 2022
1 parent b8b1f24 commit 59a14b1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ import { YourFirstMiddleware } from './your-own-middlewares';
const composition = new MiddlewareComposition(
new YourFirstMiddleware(),
new SetUtmParametersMiddleware({
utm_source: 'your-website',
utm_medium: 'referral',
utm_campaign: 'my-campagin',
params: {
utm_source: 'your-website',
utm_medium: 'referral',
utm_campaign: 'my-campaign',
},
})
);

Expand All @@ -86,15 +88,17 @@ If you are just able to append a script to a blog or a CMS, or if you are using
```html
<script src="https://unpkg.com/hyperlink-middleware@latest/dist/umd/index.min.js"></script>
<script>
var composition = HyperlinkMiddleware.MiddlewareComposition(
HyperlinkMiddleware.SetUtmParametersMiddleware({
utm_source: 'your-website',
utm_medium: 'referral',
utm_campaign: 'my-campagin',
var composition = new HyperlinkMiddleware.MiddlewareComposition(
new HyperlinkMiddleware.SetUtmParametersMiddleware({
params: {
utm_source: 'your-website',
utm_medium: 'referral',
utm_campaign: 'my-campaign',
},
})
);
var watcher = HyperlinkMiddleware.HyperlinkWatcher({
var watcher = new HyperlinkMiddleware.HyperlinkWatcher({
composition: composition,
});
watcher.watch();
Expand Down
2 changes: 1 addition & 1 deletion examples/set-utm-on-specific-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const utmMiddleware = SetUtmParametersMiddleware({
params: {
utm_source: 'your-website',
utm_medium: 'referral',
utm_campaign: 'my-campagin',
utm_campaign: 'my-campaign',
},
});

Expand Down

0 comments on commit 59a14b1

Please sign in to comment.