From 3a68d7d8d8bc2f768c6c6a7b13aa792ef816d6c4 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Thu, 4 Apr 2024 16:15:27 +0900 Subject: [PATCH 1/8] supportr --- CHANGELOG.md | 4 ++++ modules/Constants.js | 2 +- modules/CountlyClass.js | 2 ++ package.json | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d00506b..a802dc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 23.12.7 + +* Added support for responsive Feedback Widgets + ## 23.12.6 * Mitigated an issue where error tracking could prevent SDK initialization in async mode diff --git a/modules/Constants.js b/modules/Constants.js index 0ef2b4f..b01b19f 100644 --- a/modules/Constants.js +++ b/modules/Constants.js @@ -104,7 +104,7 @@ var healthCheckCounterEnum = Object.freeze({ errorMessage: "cly_hc_error_message", }); -var SDK_VERSION = "23.12.5"; +var SDK_VERSION = "23.12.7"; var SDK_NAME = "javascript_native_web"; // Using this on document.referrer would return an array with 17 elements in it. The 12th element (array[11]) would be the path we are looking for. Others would be things like password and such (use https://regex101.com/ to check more) diff --git a/modules/CountlyClass.js b/modules/CountlyClass.js index 15de017..0b690a5 100644 --- a/modules/CountlyClass.js +++ b/modules/CountlyClass.js @@ -3064,6 +3064,8 @@ class CountlyClass { if (feedbackWidgetSegmentation) { var customObjectToSendWithTheWidget = {}; customObjectToSendWithTheWidget.sg = feedbackWidgetSegmentation; + customObjectToSendWithTheWidget.tc = 1; // indicates SDK supports opening links from the widget in a new tab + customObjectToSendWithTheWidget.rw = 1; // indicates SDK supports responsive widgets url += "&custom=" + JSON.stringify(customObjectToSendWithTheWidget); } // Origin is passed to the popup so that it passes it back in the postMessage event diff --git a/package.json b/package.json index 6e86b99..cf0c7a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "countly-sdk-js", - "version": "23.12.5", + "version": "23.12.7", "description": "Countly JavaScript SDK", "type": "module", "main": "Countly.js", From f23849486457e32da596aed078a2b3128134b94b Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:43:38 +0900 Subject: [PATCH 2/8] rem --- modules/CountlyClass.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/CountlyClass.js b/modules/CountlyClass.js index 0b690a5..d71791b 100644 --- a/modules/CountlyClass.js +++ b/modules/CountlyClass.js @@ -3065,7 +3065,6 @@ class CountlyClass { var customObjectToSendWithTheWidget = {}; customObjectToSendWithTheWidget.sg = feedbackWidgetSegmentation; customObjectToSendWithTheWidget.tc = 1; // indicates SDK supports opening links from the widget in a new tab - customObjectToSendWithTheWidget.rw = 1; // indicates SDK supports responsive widgets url += "&custom=" + JSON.stringify(customObjectToSendWithTheWidget); } // Origin is passed to the popup so that it passes it back in the postMessage event From bd53fa0ee89f646cd83fcefc9c160ab63e1043c5 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:49:17 +0900 Subject: [PATCH 3/8] c --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a802dc5..f063d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 23.12.7 -* Added support for responsive Feedback Widgets +* Added support for Feedback Widgets terms and conditions ## 23.12.6 From 1c6b61b9209260328d74ea7eba3c0ee1c8c32df6 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:50:01 +0900 Subject: [PATCH 4/8] cc --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f063d58..c59d655 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 23.12.7 -* Added support for Feedback Widgets terms and conditions +* Added support for Feedback Widgets' terms and conditions ## 23.12.6 From ba4e2c36a634d17394ea4fe7ee5942f6b8b0e3af Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:29:16 +0900 Subject: [PATCH 5/8] empty string issue --- CHANGELOG.md | 1 + cypress/e2e/health_check.cy.js | 2 +- modules/CountlyClass.js | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d00506b..13381ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 23.12.6 * Mitigated an issue where error tracking could prevent SDK initialization in async mode +* Improved Health Check reporting ## 23.12.5 diff --git a/cypress/e2e/health_check.cy.js b/cypress/e2e/health_check.cy.js index 131bb7d..0d2fc4e 100644 --- a/cypress/e2e/health_check.cy.js +++ b/cypress/e2e/health_check.cy.js @@ -21,7 +21,7 @@ describe("Health Check tests ", () => { // Test the 'hc' parameter const hcParam = url.searchParams.get("hc"); const hcParamObj = JSON.parse(hcParam); - expect(hcParamObj).to.eql({ el: 0, wl: 0, sc: -1, em: "\"\"" }); + expect(hcParamObj).to.eql({ el: 0, wl: 0, sc: -1, em: "" }); // Test the 'metrics' parameter const metricsParam = url.searchParams.get("metrics"); diff --git a/modules/CountlyClass.js b/modules/CountlyClass.js index 15de017..42dd91d 100644 --- a/modules/CountlyClass.js +++ b/modules/CountlyClass.js @@ -4754,12 +4754,16 @@ class CountlyClass { function sendInstantHCRequest() { // truncate error message to 1000 characters var curbedMessage = truncateSingleValue(self.hcErrorMessage, 1000, "healthCheck", log); + // due to some server issues we pass empty string as is + if (curbedMessage !== "") { + curbedMessage = JSON.stringify(curbedMessage); + } // prepare hc object var hc = { el: self.hcErrorCount, wl: self.hcWarningCount, sc: self.hcStatusCode, - em: JSON.stringify(curbedMessage) + em: curbedMessage }; // prepare request var request = { From 39b0fd8f0f433573cd0a9d242c7bb6afa82e3acf Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:36:12 +0900 Subject: [PATCH 6/8] moved --- modules/CountlyClass.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/CountlyClass.js b/modules/CountlyClass.js index d71791b..b8472ec 100644 --- a/modules/CountlyClass.js +++ b/modules/CountlyClass.js @@ -3061,12 +3061,12 @@ class CountlyClass { url += "&platform=" + this.platform; url += "&app_version=" + this.app_version; url += "&sdk_version=" + sdkVersion; + var customObjectToSendWithTheWidget = {}; + customObjectToSendWithTheWidget.tc = 1; // indicates SDK supports opening links from the widget in a new tab if (feedbackWidgetSegmentation) { - var customObjectToSendWithTheWidget = {}; customObjectToSendWithTheWidget.sg = feedbackWidgetSegmentation; - customObjectToSendWithTheWidget.tc = 1; // indicates SDK supports opening links from the widget in a new tab - url += "&custom=" + JSON.stringify(customObjectToSendWithTheWidget); } + url += "&custom=" + JSON.stringify(customObjectToSendWithTheWidget); // Origin is passed to the popup so that it passes it back in the postMessage event // Only web SDK passes origin and web url += "&origin=" + passedOrigin; From 27f1d298579056a2cf855854df90a2bec0954526 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:37:26 +0900 Subject: [PATCH 7/8] version update --- CHANGELOG.md | 2 +- modules/Constants.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c59d655..bfe7a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 23.12.7 +## 24.4.0 * Added support for Feedback Widgets' terms and conditions diff --git a/modules/Constants.js b/modules/Constants.js index b01b19f..a37cdce 100644 --- a/modules/Constants.js +++ b/modules/Constants.js @@ -104,7 +104,7 @@ var healthCheckCounterEnum = Object.freeze({ errorMessage: "cly_hc_error_message", }); -var SDK_VERSION = "23.12.7"; +var SDK_VERSION = "24.4.0"; var SDK_NAME = "javascript_native_web"; // Using this on document.referrer would return an array with 17 elements in it. The 12th element (array[11]) would be the path we are looking for. Others would be things like password and such (use https://regex101.com/ to check more) diff --git a/package.json b/package.json index cf0c7a0..7f349cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "countly-sdk-js", - "version": "23.12.7", + "version": "24.4.0", "description": "Countly JavaScript SDK", "type": "module", "main": "Countly.js", From fe04aefc9910b52321ce37e0d90e6016a8fd239b Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:38:44 +0900 Subject: [PATCH 8/8] changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13381ba..d00506b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,6 @@ ## 23.12.6 * Mitigated an issue where error tracking could prevent SDK initialization in async mode -* Improved Health Check reporting ## 23.12.5