-
Notifications
You must be signed in to change notification settings - Fork 9
refactor: pass CustomUrl to matomo tag manager pageview events
#2887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
abcc501
0635b0b
f31ddc8
1d0fd15
2d92fe0
9236573
e0d648f
5c0ee53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /** | ||
| * Copyright (c) 2019-present, NDLA. | ||
| * | ||
| * This source code is licensed under the GPLv3 license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| */ | ||
|
|
||
| import { getTrackedUrl } from "../PageTitle"; | ||
|
|
||
| test("getTrackedUrl with article-url and empty language", () => { | ||
| const url = getTrackedUrl("/article/123"); | ||
| expect(url).toMatch("https://test.ndla.no/article/123"); | ||
| }); | ||
|
|
||
| test("getTrackedUrl with article-url and non-default language", () => { | ||
| const url = getTrackedUrl("/nn/article/123"); | ||
| expect(url).toMatch("https://test.ndla.no/article/123"); | ||
| }); | ||
|
|
||
| test("getTrackedUrl with article-url and default language", () => { | ||
| const url = getTrackedUrl("/nb/article/123"); | ||
| expect(url).toMatch("https://test.ndla.no/article/123"); | ||
| }); | ||
|
|
||
| test("getTrackedUrl with iframe-url and nb language", () => { | ||
| const url = getTrackedUrl("/article-iframe/nb/urn:topic:123/1"); | ||
| expect(url).toMatch("https://test.ndla.no/article-iframe/urn:topic:123/1"); | ||
| }); | ||
|
|
||
| test("getTrackedUrl with iframe-url and nn language", () => { | ||
| const url = getTrackedUrl("/article-iframe/nn/urn:topic:123/1"); | ||
| expect(url).toMatch("https://test.ndla.no/article-iframe/urn:topic:123/1"); | ||
| }); | ||
|
|
||
| test("getTrackedUrl with iframe-url and no language", () => { | ||
| const url = getTrackedUrl("/article-iframe/urn:topic:123/1"); | ||
| expect(url).toMatch("https://test.ndla.no/article-iframe/urn:topic:123/1"); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mens du har dette friskt i minnet: Kunne du skrevet et par kommentarer om hvorfor
getCanonicalUrloggetAlternateUrlmå behandlesnn,enognbforskjellig? Fort gjort å glemme når en ikke holder aktivt på med det.