Skip to content

Commit

Permalink
Extend cross-domain linking with more user/session information and op…
Browse files Browse the repository at this point in the history
…tional configuration

#1278
  • Loading branch information
igneel64 authored and matus-tomlein committed Jan 15, 2024
1 parent 8626747 commit 2bcb587
Show file tree
Hide file tree
Showing 14 changed files with 698 additions and 49 deletions.
8 changes: 4 additions & 4 deletions .bundlemonrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
},
{
"path": "./trackers/browser-tracker/dist/index.umd.min.js",
"maxSize": "15kb",
"maxSize": "15.5kb",
"maxPercentIncrease": 10
},
{
"path": "./trackers/javascript-tracker/dist/sp.js",
"maxSize": "25kb",
"maxSize": "25.5kb",
"maxPercentIncrease": 10
},
{
"path": "./trackers/javascript-tracker/dist/sp.lite.js",
"maxSize": "15.5kb",
"maxSize": "16kb",
"maxPercentIncrease": 10
},
{
"path": "./libraries/browser-tracker-core/dist/index.module.js",
"maxSize": "26kb",
"maxSize": "27kb",
"maxPercentIncrease": 10
},
{
Expand Down
13 changes: 13 additions & 0 deletions api-docs/docs/browser-tracker/browser-tracker.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ export type EventBatch = GetBatch | PostBatch;
// @public (undocumented)
export type EventMethod = "post" | "get" | "beacon";

// @public (undocumented)
export type ExtendedCrossDomainLinkerAttributes = {
userId?: boolean;
sessionId?: boolean;
sourceId?: boolean;
sourcePlatform?: boolean;
reason?: boolean | ((evt: Event) => string);
};

// @public (undocumented)
export type ExtendedCrossDomainLinkerOptions = boolean | ExtendedCrossDomainLinkerAttributes;

// @public
export type FilterProvider = [
ContextFilter,
Expand Down Expand Up @@ -371,6 +383,7 @@ export type TrackerConfiguration = {
useStm?: boolean;
bufferSize?: number;
crossDomainLinker?: (elt: HTMLAnchorElement | HTMLAreaElement) => boolean;
useExtendedCrossDomainLinker?: ExtendedCrossDomainLinkerOptions;
maxPostBytes?: number;
maxGetBytes?: number;
discoverRootDomain?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@snowplow/browser-tracker-core",
"comment": "Allow for extended cross domain linking information using the useExtendedCrossDomainLinker option",
"type": "none"
}
],
"packageName": "@snowplow/browser-tracker-core"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@snowplow/browser-tracker",
"comment": "Add new useExtendedCrossDomainLinker option",
"type": "none"
}
],
"packageName": "@snowplow/browser-tracker"
}
4 changes: 4 additions & 0 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
"name": "@snowplow/tracker-core",
"allowedCategories": [ "libraries", "plugins", "trackers" ]
},
{
"name": "@testing-library/dom",
"allowedCategories": [ "libraries" ]
},
{
"name": "@types/dockerode",
"allowedCategories": [ "trackers" ]
Expand Down
Loading

0 comments on commit 2bcb587

Please sign in to comment.