Skip to content

Commit

Permalink
Applying documentation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 25, 2024
1 parent 4dfbd7e commit bea8358
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface BrowserTracker
| [namespace](./browser-tracker.browsertracker.namespace.md) | string | The tracker namespace |
| [newSession](./browser-tracker.browsertracker.newsession.md) | () => void | Expires current session and starts a new session. |
| [preservePageViewId](./browser-tracker.browsertracker.preservepageviewid.md) | () =&gt; void | Stop regenerating <code>pageViewId</code> (available from <code>web_page</code> context) |
| [preservePageViewIdForUrl](./browser-tracker.browsertracker.preservepageviewidforurl.md) | (preserve: PreservePageViewIdForUrl) =&gt; void | Decide how the <code>pageViewId</code> should be preserved based on the URL. If set to <code>false</code>, the <code>pageViewId</code> will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization). If set to <code>true</code> or <code>'full'</code>, the <code>pageViewId</code> will be kept the same for all page views with that exact URL (even for events tracked before the page view event). If set to <code>'pathname'</code>, the <code>pageViewId</code> will be kept the same for all page views with the same pathname (search params or fragment may change). If set to <code>'pathnameAndSearch'</code>, the <code>pageViewId</code> will be kept the same for all page views with the same pathname and search params (fragment may change). If <code>preservePageViewId</code> is enabled, the <code>preservePageViewIdForUrl</code> setting is ignored. Defaults to <code>false</code>. |
| [setBufferSize](./browser-tracker.browsertracker.setbuffersize.md) | (newBufferSize: number) =&gt; void | Alter buffer size Can be useful if you want to stop batching requests to ensure events start sending closer to event creation |
| [setCollectorUrl](./browser-tracker.browsertracker.setcollectorurl.md) | (collectorUrl: string) =&gt; void | Specify the Snowplow collector URL. Specific http or https to force it or leave it off to match the website protocol. |
| [setCookiePath](./browser-tracker.browsertracker.setcookiepath.md) | (path: string) =&gt; void | Set first-party cookie path |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [BrowserTracker](./browser-tracker.browsertracker.md) &gt; [preservePageViewIdForUrl](./browser-tracker.browsertracker.preservepageviewidforurl.md)

## BrowserTracker.preservePageViewIdForUrl property

Decide how the `pageViewId` should be preserved based on the URL. If set to `false`<!-- -->, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization). If set to `true` or `'full'`<!-- -->, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event). If set to `'pathname'`<!-- -->, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change). If set to `'pathnameAndSearch'`<!-- -->, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change). If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored. Defaults to `false`<!-- -->.

<b>Signature:</b>

```typescript
preservePageViewIdForUrl: (preserve: PreservePageViewIdForUrl) => void;
```
1 change: 1 addition & 0 deletions api-docs/docs/browser-tracker/markdown/browser-tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
| [ParsedIdCookie](./browser-tracker.parsedidcookie.md) | The format of state elements stored in the <code>id</code> cookie. |
| [Platform](./browser-tracker.platform.md) | |
| [PostBatch](./browser-tracker.postbatch.md) | A collection of POST events which are sent to the collector. This will be a collection of JSON objects. |
| [PreservePageViewIdForUrl](./browser-tracker.preservepageviewidforurl.md) | |
| [RequestFailure](./browser-tracker.requestfailure.md) | The data that will be available to the <code>onRequestFailure</code> callback |
| [RuleSetProvider](./browser-tracker.rulesetprovider.md) | A ruleset provider is aa tuple that has two parts: a ruleset and the context primitive(s) If the ruleset allows the current event schema URI, the tracker will attach the context primitive(s) |
| [SelfDescribingJson](./browser-tracker.selfdescribingjson.md) | Export interface for any Self-Describing JSON such as context or Self Describing events |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [PreservePageViewIdForUrl](./browser-tracker.preservepageviewidforurl.md)

## PreservePageViewIdForUrl type

<b>Signature:</b>

```typescript
type PreservePageViewIdForUrl = boolean | "full" | "pathname" | "pathnameAndSearch";
```
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type TrackerConfiguration = {
retryFailedRequests?: boolean;
onRequestSuccess?: (data: EventBatch) => void;
onRequestFailure?: (data: RequestFailure) => void;
preservePageViewIdForUrl?: PreservePageViewIdForUrl;
};
```

Expand Down

0 comments on commit bea8358

Please sign in to comment.