From e25a95a21f89684238d779c8b629e5677d474dfc Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Thu, 25 Jan 2024 16:50:24 +0300 Subject: [PATCH 1/8] feat: add warning for defaults --- examples/Angular/main.ts | 11 +++++-- examples/Symbolication/src/main.js | 11 +++++-- examples/example_apm.html | 10 ++++-- examples/example_apm_async.html | 7 ++++- examples/example_async.html | 6 +++- examples/example_fb.html | 12 +++++-- examples/example_formdata.html | 14 ++++++--- examples/example_ga_adapter.html | 6 +++- examples/example_gdpr.html | 11 +++++-- examples/example_helpers.html | 11 +++++-- examples/example_multiple_instances.html | 40 +++++++++++++++++------- examples/example_opt_out.html | 11 +++++-- examples/example_rating_widgets.html | 11 +++++-- examples/example_remote_config.html | 11 +++++-- examples/example_sync.html | 11 +++++-- examples/examples_feedback_widgets.html | 11 +++++-- examples/mpa/index.html | 8 +++-- examples/mpa/worker_for_test.js | 11 +++++-- examples/react/src/index.js | 12 +++++-- examples/worker.js | 11 +++++-- screenlog.0 | 0 21 files changed, 187 insertions(+), 49 deletions(-) create mode 100644 screenlog.0 diff --git a/examples/Angular/main.ts b/examples/Angular/main.ts index e08d338e..37f2f0c3 100644 --- a/examples/Angular/main.ts +++ b/examples/Angular/main.ts @@ -8,9 +8,16 @@ import Countly from 'countly-sdk-web'; window.Countly = Countly; +const COUNTLY_SERVER_KEY = "https://your.server.ly"; +const COUNTLY_APP_KEY = "YOUR_APP_KEY"; + +if(COUNTLY_APP_KEY === "YOUR_APP_KEY" || COUNTLY_SERVER_KEY === "https://your.server.ly"){ + throw new Error("Please do not use default set of app key and server url") +} +// initializing countly with params Countly.init({ - app_key: "YOUR_APP_KEY", - url: "https://your.domain.countly", + app_key: COUNTLY_APP_KEY, + url: COUNTLY_SERVER_KEY, //your server goes here debug: true }); Countly.track_sessions(); diff --git a/examples/Symbolication/src/main.js b/examples/Symbolication/src/main.js index fb40c65f..3c71d560 100644 --- a/examples/Symbolication/src/main.js +++ b/examples/Symbolication/src/main.js @@ -1,9 +1,16 @@ import Countly from "countly-sdk-web"; +const COUNTLY_SERVER_KEY = "https://your.server.ly"; +const COUNTLY_APP_KEY = "YOUR_APP_KEY"; + +if(COUNTLY_APP_KEY === "YOUR_APP_KEY" || COUNTLY_SERVER_KEY === "https://your.server.ly"){ + throw new Error("Please do not use default set of app key and server url") +} +// initializing countly with params Countly.init({ - app_key: "YOUR_APP_KEY", + app_key: COUNTLY_APP_KEY, + url: COUNTLY_SERVER_KEY, //your server goes here app_version: "1.0", - url: "https://your.domain.countly", debug: true }); diff --git a/examples/example_apm.html b/examples/example_apm.html index deafa485..1bf07272 100644 --- a/examples/example_apm.html +++ b/examples/example_apm.html @@ -10,10 +10,16 @@ diff --git a/examples/example_opt_out.html b/examples/example_opt_out.html index d2a683bb..91c12feb 100644 --- a/examples/example_opt_out.html +++ b/examples/example_opt_out.html @@ -9,9 +9,16 @@ - \ No newline at end of file + From fc1ea6e433915612f003ba7cbe9ef46eff2fd36e Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:42:15 +0300 Subject: [PATCH 5/8] Update index.js --- examples/react/src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/react/src/index.js b/examples/react/src/index.js index 389a4f6d..2cb43b98 100644 --- a/examples/react/src/index.js +++ b/examples/react/src/index.js @@ -17,9 +17,9 @@ if(COUNTLY_APP_KEY === "YOUR_APP_KEY" || COUNTLY_SERVER_KEY === "https://your.se } // initializing countly with params Countly.init({ - app_key: COUNTLY_APP_KEY, - url: COUNTLY_SERVER_KEY, //your server goes here - debug: true + app_key: COUNTLY_APP_KEY, + url: COUNTLY_SERVER_KEY, //your server goes here + debug: true }); Countly.q.push(['track_sessions']); From cd66fe6a249bb5d95e33f123faa21455bfc95e0f Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:42:47 +0300 Subject: [PATCH 6/8] Update example_ga_adapter.html --- examples/example_ga_adapter.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example_ga_adapter.html b/examples/example_ga_adapter.html index 319fcfdd..7e74b9f2 100644 --- a/examples/example_ga_adapter.html +++ b/examples/example_ga_adapter.html @@ -14,7 +14,7 @@ Countly.url = "https://your.server.ly"; //your server goes here if(Countly.app_key === "YOUR_APP_KEY" || Countly.url === "https://your.server.ly"){ - console.warn("Please do not use default set of app key and server url") + console.warn("Please do not use default set of app key and server url") } Countly.debug = true; window.cly_ga_test_mode = true; @@ -191,4 +191,4 @@

Google Analytics Adaptor

- \ No newline at end of file + From 743b1d00b05aaff091796e62e5421148e1bf2897 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:43:02 +0300 Subject: [PATCH 7/8] Update example_async.html --- examples/example_async.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example_async.html b/examples/example_async.html index 9e054dbc..60923bcd 100644 --- a/examples/example_async.html +++ b/examples/example_async.html @@ -15,7 +15,7 @@ Countly.url = "https://your.server.ly"; //your server goes here if(Countly.app_key === "YOUR_APP_KEY" || Countly.url === "https://your.server.ly"){ - console.warn("Please do not use default set of app key and server url") + console.warn("Please do not use default set of app key and server url") } Countly.debug = true; @@ -62,4 +62,4 @@

Async Countly Implementation

- \ No newline at end of file + From 860f1f32e6ae0efeea16360415b7c7e3c62607ff Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:43:12 +0300 Subject: [PATCH 8/8] Update example_apm_async.html --- examples/example_apm_async.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example_apm_async.html b/examples/example_apm_async.html index ebb4b60c..bf56e48f 100644 --- a/examples/example_apm_async.html +++ b/examples/example_apm_async.html @@ -15,7 +15,7 @@ Countly.url = "https://your.server.ly"; //your server goes here if(Countly.app_key === "YOUR_APP_KEY" || Countly.url === "https://your.server.ly"){ - console.warn("Please do not use default set of app key and server url") + console.warn("Please do not use default set of app key and server url") } Countly.debug = true; @@ -70,4 +70,4 @@

Async Countly Implementation

- \ No newline at end of file +