-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong utm parsing by making context.page.search the source of tru…
…th for query params. (#839)
- Loading branch information
Showing
3 changed files
with
49 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@segment/analytics-next': patch | ||
--- | ||
|
||
Fixes a utm-parameter parsing bug where overridden page.search properties would not be reflected in the context.campaign object | ||
```ts | ||
analytics.page(undefined, undefined, {search: "?utm_source=123&utm_content=content" ) | ||
analytics.track("foo", {url: "....", search: "?utm_source=123&utm_content=content" ) | ||
|
||
// should result in a context.campaign of: | ||
{ source: 123, content: 'content'} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters