Skip to content

Commit 34af2a9

Browse files
[WEB-3694] Custom CT-ID - Rebased
1 parent e0afddc commit 34af2a9

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [1.14.5] 28th Apr, 2025
5+
- Added Clevertap Custom Id Support
6+
- Added Public API `getAllQualifiedCampaignDetails` for debugging purpose
7+
48
## [1.14.4] 24th Apr, 2025
59
- Updated rendering logic for Web Native Display Custom Html Template.
610

clevertap.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7776,7 +7776,6 @@
77767776
this.gcookie = void 0;
77777777
_classPrivateFieldLooseBase(this, _logger$9)[_logger$9] = logger;
77787778
this.gcookie = this.getGuid() || customId;
7779-
console.log('this.gcookie', this.gcookie);
77807779
}
77817780

77827781
getGuid() {
@@ -11616,7 +11615,7 @@
1161611615
case WVE_QUERY_PARAMS.SDK_CHECK:
1161711616
if (parentWindow) {
1161811617
logger$1.debug('SDK version check');
11619-
const sdkVersion = '1.14.4';
11618+
const sdkVersion = '1.14.5';
1162011619
parentWindow.postMessage({
1162111620
message: 'SDKVersion',
1162211621
accountId,
@@ -15341,7 +15340,7 @@
1534115340
let proto = document.location.protocol;
1534215341
proto = proto.replace(':', '');
1534315342
dataObject.af = { ...dataObject.af,
15344-
lib: 'web-sdk-v1.14.4',
15343+
lib: 'web-sdk-v1.14.5',
1534515344
protocol: proto,
1534615345
...$ct.flutterVersion
1534715346
}; // app fields
@@ -16289,7 +16288,7 @@
1628916288
_classPrivateFieldLooseBase(this, _account)[_account] = new Account((_clevertap$account = clevertap.account) === null || _clevertap$account === void 0 ? void 0 : _clevertap$account[0], clevertap.region || ((_clevertap$account2 = clevertap.account) === null || _clevertap$account2 === void 0 ? void 0 : _clevertap$account2[1]), clevertap.targetDomain || ((_clevertap$account3 = clevertap.account) === null || _clevertap$account3 === void 0 ? void 0 : _clevertap$account3[2]), clevertap.token || ((_clevertap$account4 = clevertap.account) === null || _clevertap$account4 === void 0 ? void 0 : _clevertap$account4[3]));
1629016289
encryption.key = (_clevertap$account5 = clevertap.account) === null || _clevertap$account5 === void 0 ? void 0 : _clevertap$account5[0].id; // Custom Guid will be set here
1629116290

16292-
let result = validateCustomCleverTapID(clevertap === null || clevertap === void 0 ? void 0 : (_clevertap$config = clevertap.config) === null || _clevertap$config === void 0 ? void 0 : _clevertap$config.customId);
16291+
const result = validateCustomCleverTapID(clevertap === null || clevertap === void 0 ? void 0 : (_clevertap$config = clevertap.config) === null || _clevertap$config === void 0 ? void 0 : _clevertap$config.customId);
1629316292

1629416293
if (!(result === null || result === void 0 ? void 0 : result.isValid)) {
1629516294
_classPrivateFieldLooseBase(this, _logger)[_logger].error(result === null || result === void 0 ? void 0 : result.error);
@@ -16945,7 +16944,7 @@
1694516944
const result = validateCustomCleverTapID(customId);
1694616945
/* Only add Custom Id if no existing id is present */
1694716946

16948-
if (!_classPrivateFieldLooseBase(this, _device)[_device].gcookie) {
16947+
if (_classPrivateFieldLooseBase(this, _device)[_device].gcookie) {
1694916948
return;
1695016949
}
1695116950

@@ -17182,7 +17181,7 @@
1718217181
}
1718317182

1718417183
getSDKVersion() {
17185-
return 'web-sdk-v1.14.4';
17184+
return 'web-sdk-v1.14.5';
1718617185
}
1718717186

1718817187
defineVariable(name, defaultValue) {

clevertap.js.map

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

clevertap.min.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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "clevertap-web-sdk",
3-
"version": "1.14.4",
3+
"version": "1.14.5",
44
"description": "",
55
"main": "clevertap.js",
66
"scripts": {

src/clevertap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ export default class CleverTap {
660660
const result = validateCustomCleverTapID(customId)
661661

662662
/* Only add Custom Id if no existing id is present */
663-
if (!this.#device.gcookie) {
663+
if (this.#device.gcookie) {
664664
return
665665
}
666666

src/modules/device.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export default class DeviceManager {
99
constructor ({ logger, customId }) {
1010
this.#logger = logger
1111
this.gcookie = this.getGuid() || customId
12-
console.log('this.gcookie', this.gcookie)
1312
}
1413

1514
getGuid () {

0 commit comments

Comments
 (0)