Skip to content

Commit 0a86ef2

Browse files
committed
v11.0.7
1 parent a73b943 commit 0a86ef2

File tree

8 files changed

+26
-6
lines changed

8 files changed

+26
-6
lines changed

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ const Gleap = window.Gleap;
33
Gleap.setFrameUrl("http://0.0.0.0:3001");
44
Gleap.setApiUrl("http://0.0.0.0:9000");
55

6+
Gleap.setDisablePageTracking(true);
7+
68
Gleap.setLanguage("de");
79

8-
Gleap.initialize("XNWIMPYahK8tJcJCp7RrqtoxZo1MMV7n");
10+
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
911

1012
/*Gleap.setUrlHandler((url, newTab) => {
1113
alert("URL: " + url + " newTab: " + newTab);
1214
});*/
1315

1416
Gleap.identify("12345", {
1517
name: "John Doe",
16-
email: "lukas@gleap.io"
18+
email: "franzi@gleap.io"
1719
});

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export namespace Gleap {
7474
function setDisableInAppNotifications(
7575
disableInAppNotifications: boolean
7676
): void;
77+
function setDisablePageTracking(
78+
disablePageTracking: boolean
79+
): void;
7780
function identify(
7881
userId: string,
7982
customerData: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "11.0.6",
3+
"version": "11.0.7",
44
"main": "build/index.js",
55
"scripts": {
66
"start": "webpack serve",

published/11.0.7/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Gleap.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class Gleap {
3838
static silentCrashReportSent = false;
3939
initialized = false;
4040
offlineMode = false;
41+
disablePageTracking = false;
4142
disableInAppNotifications = false;
4243

4344
// Global data
@@ -115,6 +116,15 @@ class Gleap {
115116
instance.disableInAppNotifications = disableInAppNotifications;
116117
}
117118

119+
/**
120+
* Disable the default page tracking.
121+
* @param {*} disablePageTracking
122+
*/
123+
static setDisablePageTracking(disablePageTracking) {
124+
const instance = this.getInstance();
125+
instance.disablePageTracking = disablePageTracking;
126+
}
127+
118128
/**
119129
* Revert console log overwrite.
120130
*/

src/GleapStreamedEvent.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ export default class GleapStreamedEvent {
5353
this.startPageListener();
5454
this.resetErrorCountLoop();
5555
}
56-
56+
5757
trackInitialEvents() {
5858
GleapStreamedEvent.getInstance().logEvent("sessionStarted");
5959
GleapStreamedEvent.getInstance().logCurrentPage();
6060
}
6161

6262
logCurrentPage() {
63+
if (Gleap.getInstance().disablePageTracking) {
64+
return;
65+
}
66+
6367
const currentUrl = window.location.href;
6468
if (currentUrl && currentUrl !== this.lastUrl) {
6569
this.lastUrl = currentUrl;

0 commit comments

Comments
 (0)