From 58e4b875e856a8727efa4498248457177f6b2018 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:53:40 +0900 Subject: [PATCH 1/3] [FW] Terms and conditions support --- CHANGELOG.md | 3 +++ examples/create_examples.py | 2 +- lib/countly.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 990b3648..d69ab34b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 23.12.7 +- Added support for Feedback Widget terms and conditions + ## 23.12.6 - Mitigated an issue where error tracking could prevent SDK initialization in async mode diff --git a/examples/create_examples.py b/examples/create_examples.py index 6273ae8a..3341ad93 100644 --- a/examples/create_examples.py +++ b/examples/create_examples.py @@ -23,7 +23,7 @@ def setup_react_example(): def setup_angular_example(): print("Creating Angular example...") - os.system("npx @angular/cli new angular-example --defaults") + os.system("npx @angular/cli@next new angular-example --defaults") # Copy contents of Angular folder over to Angular example shutil.copytree("Angular", "angular-example/src", dirs_exist_ok=True) diff --git a/lib/countly.js b/lib/countly.js index 4322376b..213ec49e 100644 --- a/lib/countly.js +++ b/lib/countly.js @@ -3726,6 +3726,7 @@ 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); } // Origin is passed to the popup so that it passes it back in the postMessage event From d37638ecbbe16957cb626078efa66e61bc5f937a Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:35:20 +0900 Subject: [PATCH 2/3] moved tc --- lib/countly.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/countly.js b/lib/countly.js index 213ec49e..ee5189be 100644 --- a/lib/countly.js +++ b/lib/countly.js @@ -3723,12 +3723,12 @@ 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 5523a95f467735a78b825fec9825b7d57fe5d1da Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:40:30 +0900 Subject: [PATCH 3/3] version update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d69ab34b..baaededa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 23.12.7 +## 24.4.0 - Added support for Feedback Widget terms and conditions ## 23.12.6