Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#69157 [@types/mixpanel] Allow string types…
Browse files Browse the repository at this point in the history
… for the `Mixpanel.Config.track_pageview` parameter by @codershiba
  • Loading branch information
codershiba authored Apr 17, 2024
1 parent 0043a82 commit 895d2be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/mixpanel/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ declare namespace Mixpanel {
/**
* Should we track a page view on page load
*
* @default true
* @default undefined
*/
track_pageview?: boolean | undefined;
track_pageview?: "url-with-path" | "url-with-path-and-query-string" | "full-url" | boolean | undefined;
/**
* Debug mode
*
Expand Down
3 changes: 3 additions & 0 deletions types/mixpanel/mixpanel-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ function mixpanel_base() {
mixpanel.init("new token");
mixpanel.init("new token", { persistence_name: "config" });
mixpanel.init("new token", { persistence_name: "config" }, "library_name");
mixpanel.init("new token", { track_pageview: "url-with-path" });
mixpanel.init("new token", { track_pageview: "url-with-path-and-query-string" });
mixpanel.init("new token", { track_pageview: "full-url" });

mixpanel.push(["register", { a: "b" }]);

Expand Down

0 comments on commit 895d2be

Please sign in to comment.