Skip to content

Commit

Permalink
v2.4.0 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaumaus committed Oct 17, 2023
1 parent f116161 commit 05ff4c1
Show file tree
Hide file tree
Showing 13 changed files with 267 additions and 34 deletions.
11 changes: 11 additions & 0 deletions dist/esnext/Lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ export interface PageViewsOptions {
heartbeatOnBackground?: boolean;
/** Disable user-flow */
noUserFlow?: boolean;
/**
* Set to `true` to enable hash-based routing.
* For example if you have pages like /#/path or want to track pages like /path#hash
*/
hash?: boolean;
/**
* Set to `true` to enable search-based routing.
* For example if you have pages like /path?search
*/
search?: boolean;
}
export declare const defaultPageActions: {
stop(): void;
Expand All @@ -74,6 +84,7 @@ export declare class Lib {
private trackPathChange;
private getPreviousPage;
private trackPage;
submitPageView(pg: null | string, prev: string | null | undefined, unique: boolean, perf: any): void;
private debug;
private canTrack;
private sendRequest;
Expand Down
17 changes: 13 additions & 4 deletions dist/esnext/Lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esnext/Lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/esnext/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ export declare function track(event: TrackEventOptions): void;
* @returns {PageActions} The actions related to the tracking. Used to stop tracking pages.
*/
export declare function trackViews(options?: PageViewsOptions): Promise<PageActions>;
/**
* This function is used to manually track a page view event.
* It's useful if your application uses esoteric routing which is not supported by Swetrix by default.
*
* @param path Path of the page to track (this will be sent to the Swetrix API and displayed in the dashboard).
* @param prev Path of the previous page.
* @param unique If set to `true`, only 1 event with the same ID will be saved per user session.
* @returns void
*/
export declare function trackPageview(path: string, prev?: string, unique?: boolean): void;
14 changes: 14 additions & 0 deletions dist/esnext/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esnext/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 05ff4c1

Please sign in to comment.