Skip to content

Commit

Permalink
New bundle (#456)
Browse files Browse the repository at this point in the history
* new bundle

* read

* is

* reordered countly

* count.ly to countly

* re order features

* seperated elses

* function gap

* linter

* reverse linter

* gap

* more

* increased test robustness

* reminified

* removed mapping

* Update CHANGELOG.md

---------

Co-authored-by: Artūrs Kadiķis <kadikis.arturs@gmail.com>
  • Loading branch information
turtledreams and ArtursKadikis committed Dec 6, 2023
1 parent 95de72c commit 92f684d
Show file tree
Hide file tree
Showing 59 changed files with 601 additions and 680 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib/countly.min.js
lib
plugin/boomerang/boomerang.min.js
examples/
node_modules
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## X.X.X
## 23.12.0
- You can now provide custom storage methods to the SDK
- You can now use the SDK in web workers
- From this version on the SDK is bundled from the Countly JavaScript SDK

## 23.6.3
- You can now add segmentation while presenting a widget with 'present_feedback_widget'
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Countly Web SDK

This SDK is bundled from the modular [Countly JavaScript SDK](https://github.com/Countly/countly-sdk-js).

This repository contains the Countly Web SDK, which can be integrated into websites and web applications. The Countly Web SDK is intended to be used with [Countly Lite](https://countly.com/lite), [Countly Flex](https://countly.com/flex) [Countly Enterprise](https://countly.com/enterprise).

## What is Countly?
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/click_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
var domEl = queryExtractor(window.location.search).dom;
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
debug: true,
test_mode: true
})
Expand Down
8 changes: 4 additions & 4 deletions cypress/fixtures/multi_instance.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//initializing first instance, which will be global Countly
Countly.init({
app_key: "YOUR_APP_KEY1",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true
})
Countly.remove_consent();
Expand Down Expand Up @@ -57,7 +57,7 @@
//initialize second instance for another app synchronously
var Countly2 = Countly.init({
app_key: "YOUR_APP_KEY2", //must have different APP key
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true

});
Expand Down Expand Up @@ -94,7 +94,7 @@
//initialize third instance for another app asynchronously
Countly.q.push(["init", {
app_key: "YOUR_APP_KEY3", //must have different APP key
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true

}])
Expand Down Expand Up @@ -128,7 +128,7 @@
//initialize fourth instance for another app asynchronously
Countly.q.push(["init", {
app_key: "YOUR_APP_KEY4", //must have different APP key
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true

}])
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/referrer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script type='text/javascript'>
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
utm: { aa: true },
test_mode: true,
test_mode_eq: true,
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/scroll_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
console.error("cleared the storage");
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
debug:true,
test_mode: true
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/scroll_test_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script type='text/javascript'>
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
debug:true,
test_mode: true
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/scroll_test_3.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
console.error("cleared the storage");
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
debug:true,
test_mode: true
})
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/session_test_auto.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
//initializing countly with params
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
device_id: "auto",
session_update: 5,
session_update: 4,
test_mode: true,
use_session_cookie: confObj.use_session_cookie || false,
debug:true
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/session_test_manual_1.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
//initializing countly with params
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
device_id: "manual_1",
session_update: 5,
session_update: 4,
test_mode: true,
use_session_cookie: confObj.use_session_cookie || false,
debug:true
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/session_test_manual_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
//initializing countly with params
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
device_id: "manual_2",
session_update: 5,
session_update: 4,
test_mode: true,
use_session_cookie: confObj.use_session_cookie || false,
debug:true
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/user_agent.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
debug:true
})
// create a new button element and assign values of user agent functions to them here:
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/consents.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var hp = require("../support/helper");
function initMain(consent) {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
require_consent: consent,
device_id: "György Ligeti",
test_mode: true,
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/crashes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var hp = require("../support/helper");
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true
});
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/device_id.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var hp = require("../support/helper");
function initMain(deviceId, offline, searchQuery, clear, rq, eq) {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
device_id: deviceId,
test_mode: rq,
test_mode_eq: eq,
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/device_id_change.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var hp = require("../support/helper");
function initMain(offline) {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true,
debug: true,
offline_mode: offline
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/device_id_init_scenarios.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var hp = require("../support/helper");
function initMain(deviceId, offline, searchQuery, clear) {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
device_id: deviceId,
test_mode: true,
debug: true,
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var hp = require("../support/helper");
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
session_update: 3,
test_mode: true,
test_mode_eq: true,
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/health_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var hp = require("../support/helper");
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true
});
}
Expand All @@ -14,7 +14,7 @@ describe("Health Check tests ", () => {
it("Check if health check is sent at the beginning", () => {
hp.haltAndClearStorage(() => {
initMain();
cy.intercept("https://your.domain.count.ly/i?*").as("getXhr");
cy.intercept("https://your.domain.countly/i?*").as("getXhr");
cy.wait("@getXhr").then((xhr) => {
const url = new URL(xhr.request.url);

Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var hp = require("../support/helper");
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
debug: true,
test_mode: true
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/internal_limits.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const limits = {
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode_eq: true,
test_mode: true,
debug: true,
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/manual_widget_reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function common_rating_check(param, num) {
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode_eq: true,
test_mode: true,
debug: true
Expand Down
8 changes: 6 additions & 2 deletions cypress/integration/remaining_requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var hp = require("../support/helper");
function initMain(shouldStopRequests) {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
app_version: "1.0",
// would prevent requests from being sent to the server if true
test_mode: shouldStopRequests
Expand All @@ -19,7 +19,11 @@ describe("Remaining requests tests ", () => {

// We will expect 4 requests: health check, begin_session, end_session, orientation
hp.interceptAndCheckRequests(undefined, undefined, undefined, "?hc=*", "hc", (requestParams) => {
expect(requestParams.get("hc")).to.equal(JSON.stringify({ el: 0, wl: 0, sc: -1, em: "\"\"" }));
const params = JSON.parse(requestParams.get("hc"));
assert.isTrue(typeof params.el === "number");
assert.isTrue(typeof params.wl === "number");
assert.isTrue(typeof params.sc === "number");
assert.isTrue(typeof params.em === "string");
expect(requestParams.get("rr")).to.equal(null);
});
cy.wait(1000).then(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/reponse_validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var hp = require("../support/helper");
function initMain() {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
url: "https://your.domain.countly",
test_mode: true,
test_mode_eq: true,
debug: true
Expand Down
Loading

0 comments on commit 92f684d

Please sign in to comment.