Skip to content

Commit 2677648

Browse files
sinhaayush7arielsilvestrisileskydanieljackinspaco-walkme
authored
Bug/sdk 2455/fix sdk for turkish servers (#720)
* updates clevertap sdks path * updates clevertap sdk url * updates clevertap version in history.md and package.json * updates clevertap sdks path * updates clevertap sdk url * updates clevertap version in history.md and package.json * Check for last instance of .js extension in filename (#709) * Check for last instance of .js extension in filename * adding clarifying comments for change * Update scripts/upload-assets.js Co-authored-by: Seth Silesky <[email protected]> Co-authored-by: Seth Silesky <[email protected]> * Add WalkMe SRI (cloned) (#718) * Add WalkMe SRI Fix previous test and add new cases * Fix unit test Co-authored-by: Francisco Garcia <[email protected]> * version bump (#719) * updates tag from http to https * removes use-https library; loads clevertap over https only * modifies segment identify to use onUserLogin instead of profile.push Co-authored-by: Ariel Silvestri <[email protected]> Co-authored-by: Seth Silesky <[email protected]> Co-authored-by: dsjackins <[email protected]> Co-authored-by: Francisco Garcia <[email protected]>
1 parent 6b132b3 commit 2677648

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

integrations/clevertap/HISTORY.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
1.0.4 / 2022-12-14
3+
* Updates clevertap sdk url
4+
15
1.0.2 / 2017-08-30
26
==================
37

integrations/clevertap/lib/index.js

+4-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
var integration = require('@segment/analytics.js-integration');
8-
var useHttps = require('use-https');
98
var each = require('@ndhoule/each');
109
var is = require('is');
1110

@@ -17,11 +16,8 @@ var CleverTap = (module.exports = integration('CleverTap')
1716
.global('clevertap')
1817
.option('clevertap_account_id', '')
1918
.option('region', '')
20-
.tag('http', '<script src="http://static.clevertap.com/js/a.js">')
21-
.tag(
22-
'https',
23-
'<script src="https://d2r1yp2w7bby2u.cloudfront.net/js/a.js">'
24-
));
19+
.tag('https', '<script src="https://static.clevertap.com/js/clevertap.min.js">')
20+
);
2521

2622
/**
2723
* Initialize.
@@ -47,8 +43,7 @@ CleverTap.prototype.initialize = function() {
4743
// and since dealing with mongo is much more painful, we will strip here
4844
window.clevertap.region = region.replace('.', '');
4945
}
50-
var protocol = useHttps() ? 'https' : 'http';
51-
this.load(protocol, this.ready);
46+
this.load('https', this.ready);
5247
};
5348

5449
CleverTap.prototype.loaded = function() {
@@ -83,7 +78,7 @@ CleverTap.prototype.identify = function(identify) {
8378
each(function(value, key) {
8479
if (!is.object(value)) supportedTraits[key] = value;
8580
}, traits);
86-
window.clevertap.profile.push({
81+
window.clevertap.onUserLogin.push({
8782
Site: supportedTraits
8883
});
8984
};

integrations/clevertap/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/analytics.js-integration-clevertap",
33
"description": "The CleverTap analytics.js integration.",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"keywords": [
66
"analytics.js",
77
"analytics.js-integration",

0 commit comments

Comments
 (0)