Skip to content

Commit bea8358

Browse files
Applying documentation updates.
1 parent 4dfbd7e commit bea8358

5 files changed

+27
-0
lines changed

api-docs/docs/browser-tracker/markdown/browser-tracker.browsertracker.md

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ interface BrowserTracker
4040
| [namespace](./browser-tracker.browsertracker.namespace.md) | string | The tracker namespace |
4141
| [newSession](./browser-tracker.browsertracker.newsession.md) | () => void | Expires current session and starts a new session. |
4242
| [preservePageViewId](./browser-tracker.browsertracker.preservepageviewid.md) | () =&gt; void | Stop regenerating <code>pageViewId</code> (available from <code>web_page</code> context) |
43+
| [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>. |
4344
| [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 |
4445
| [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. |
4546
| [setCookiePath](./browser-tracker.browsertracker.setcookiepath.md) | (path: string) =&gt; void | Set first-party cookie path |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [BrowserTracker](./browser-tracker.browsertracker.md) &gt; [preservePageViewIdForUrl](./browser-tracker.browsertracker.preservepageviewidforurl.md)
4+
5+
## BrowserTracker.preservePageViewIdForUrl property
6+
7+
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`<!-- -->.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
preservePageViewIdForUrl: (preserve: PreservePageViewIdForUrl) => void;
13+
```

api-docs/docs/browser-tracker/markdown/browser-tracker.md

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
| [ParsedIdCookie](./browser-tracker.parsedidcookie.md) | The format of state elements stored in the <code>id</code> cookie. |
9494
| [Platform](./browser-tracker.platform.md) | |
9595
| [PostBatch](./browser-tracker.postbatch.md) | A collection of POST events which are sent to the collector. This will be a collection of JSON objects. |
96+
| [PreservePageViewIdForUrl](./browser-tracker.preservepageviewidforurl.md) | |
9697
| [RequestFailure](./browser-tracker.requestfailure.md) | The data that will be available to the <code>onRequestFailure</code> callback |
9798
| [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) |
9899
| [SelfDescribingJson](./browser-tracker.selfdescribingjson.md) | Export interface for any Self-Describing JSON such as context or Self Describing events |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [PreservePageViewIdForUrl](./browser-tracker.preservepageviewidforurl.md)
4+
5+
## PreservePageViewIdForUrl type
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
type PreservePageViewIdForUrl = boolean | "full" | "pathname" | "pathnameAndSearch";
11+
```

api-docs/docs/browser-tracker/markdown/browser-tracker.trackerconfiguration.md

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type TrackerConfiguration = {
4545
retryFailedRequests?: boolean;
4646
onRequestSuccess?: (data: EventBatch) => void;
4747
onRequestFailure?: (data: RequestFailure) => void;
48+
preservePageViewIdForUrl?: PreservePageViewIdForUrl;
4849
};
4950
```
5051

0 commit comments

Comments
 (0)