Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@segment/analytics.js-integration-clevertap

Package Overview
Dependencies
Maintainers
162
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics.js-integration-clevertap - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

karma.conf-ci.js

51

karma.conf.js

@@ -1,50 +0,1 @@

/* eslint-env node */
'use strict';
module.exports = function(config) {
config.set({
files: [
'test/**/*.test.js'
],
browsers: ['PhantomJS'],
frameworks: ['browserify', 'mocha'],
reporters: ['spec', 'coverage'],
preprocessors: {
'test/**/*.js': 'browserify'
},
client: {
mocha: {
grep: process.env.GREP,
reporter: 'html',
timeout: 10000
}
},
browserify: {
debug: true,
transform: [
[
'browserify-istanbul',
{
instrumenterConfig: {
embedSource: true
}
}
]
]
},
coverageReporter: {
reporters: [
{ type: 'text' },
{ type: 'html' },
{ type: 'json' }
]
}
});
};
module.exports = require('../../karma.conf');

@@ -16,3 +16,3 @@ 'use strict';

var CleverTap = module.exports = integration('CleverTap')
var CleverTap = (module.exports = integration('CleverTap')
.global('clevertap')

@@ -22,3 +22,6 @@ .option('clevertap_account_id', '')

.tag('http', '<script src="http://static.clevertap.com/js/a.js">')
.tag('https', '<script src="https://d2r1yp2w7bby2u.cloudfront.net/js/a.js">');
.tag(
'https',
'<script src="https://d2r1yp2w7bby2u.cloudfront.net/js/a.js">'
));

@@ -34,3 +37,9 @@ /**

CleverTap.prototype.initialize = function() {
window.clevertap = { event: [], profile: [], account: [], onUserLogin: [], notifications: [] };
window.clevertap = {
event: [],
profile: [],
account: [],
onUserLogin: [],
notifications: []
};
window.clevertap.enablePersonalization = true;

@@ -44,3 +53,3 @@ window.clevertap.account.push({ id: this.options.clevertap_account_id });

}
var protocol = useHttps() ? 'https': 'http';
var protocol = useHttps() ? 'https' : 'http';
this.load(protocol, this.ready);

@@ -47,0 +56,0 @@ };

{
"name": "@segment/analytics.js-integration-clevertap",
"description": "The CleverTap analytics.js integration.",
"version": "1.0.2",
"version": "1.0.3",
"keywords": [

@@ -13,14 +13,15 @@ "analytics.js",

"scripts": {
"test": "make test"
"test": "karma start",
"test:ci": "karma start karma.conf-ci.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/segment-integrations/analytics.js-integration-clevertap.git"
},
"author": "Segment",
"license": "SEE LICENSE IN LICENSE",
"homepage": "https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/clevertap#readme",
"bugs": {
"url": "https://github.com/segment-integrations/analytics.js-integration-clevertap/issues"
"url": "https://github.com/segmentio/analytics.js-integrations/issues"
},
"homepage": "https://github.com/segment-integrations/analytics.js-integration-clevertap#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/segmentio/analytics.js-integrations.git"
},
"dependencies": {

@@ -33,26 +34,19 @@ "@ndhoule/each": "^2.0.1",

"devDependencies": {
"@segment/analytics.js-core": "^3.0.0",
"@segment/analytics.js-integration-tester": "^3.1.0",
"@segment/clear-env": "^2.0.0",
"@segment/eslint-config": "^3.1.1",
"browserify": "^13.0.0",
"browserify-istanbul": "^2.0.0",
"eslint": "^2.9.0",
"eslint-plugin-mocha": "^2.2.0",
"eslint-plugin-require-path-exists": "^1.1.5",
"istanbul": "^0.4.3",
"karma": "1.3.0",
"karma-browserify": "^5.0.4",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.0.0",
"karma-junit-reporter": "^1.0.0",
"karma-mocha": "1.0.1",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sauce-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.26",
"mocha": "^2.2.5",
"npm-check": "^5.2.1",
"phantomjs-prebuilt": "^2.1.7",
"watchify": "^3.7.0"
}
"@segment/analytics.js-core": "^3.8.2",
"@segment/analytics.js-integration-tester": "^3.1.1",
"@segment/clear-env": "^2.1.1",
"browserify": "^16.2.3",
"eslint": "^5.16.0",
"karma": "^4.1.0",
"karma-browserify": "^6.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-sauce-launcher": "^2.0.2",
"karma-spec-reporter": "^0.0.32",
"karma-summary-reporter": "^1.6.0",
"mocha": "^6.1.4",
"watchify": "^3.11.1"
},
"gitHead": "a804b8c7410fe9f95bcbf006b6b143f9290863a8"
}
# analytics.js-integration-clevertap
[![CircleCI](https://circleci.com/gh/segment-integrations/analytics.js-integration-clevertap.svg?style=svg&circle-token=98ebe03ce5e831ff9d15821c337298fd6aff4033)](https://circleci.com/gh/segment-integrations/analytics.js-integration-clevertap)
[![CircleCI](https://ci.segment.com/gh/segment-integrations/analytics.js-integration-clevertap.svg?style=svg&circle-token=98ebe03ce5e831ff9d15821c337298fd6aff4033)](https://ci.segment.com/gh/segment-integrations/analytics.js-integration-clevertap)

@@ -4,0 +4,0 @@ CleverTap for Analytics.js integrations.

@@ -34,6 +34,9 @@ 'use strict';

it('should have the correct options', function() {
analytics.compare(CleverTap, integration('CleverTap')
.global('clevertap')
.option('clevertap_account_id', '')
.option('region', ''));
analytics.compare(
CleverTap,
integration('CleverTap')
.global('clevertap')
.option('clevertap_account_id', '')
.option('region', '')
);
});

@@ -87,3 +90,5 @@

it('should set account id', function() {
analytics.assert(window.clevertap.account[0].id === options.clevertap_account_id);
analytics.assert(
window.clevertap.account[0].id === options.clevertap_account_id
);
});

@@ -98,3 +103,5 @@

analytics.identify('id');
analytics.called(window.clevertap.profile.push, { Site: { Identity:'id' } });
analytics.called(window.clevertap.profile.push, {
Site: { Identity: 'id' }
});
});

@@ -104,3 +111,5 @@

analytics.identify({ trait: true });
analytics.called(window.clevertap.profile.push, { Site: { trait:true } });
analytics.called(window.clevertap.profile.push, {
Site: { trait: true }
});
});

@@ -110,8 +119,16 @@

analytics.identify('id', { trait: true });
analytics.called(window.clevertap.profile.push, { Site: { Identity:'id', trait:true } });
analytics.called(window.clevertap.profile.push, {
Site: { Identity: 'id', trait: true }
});
});
it('should drop objects traits', function() {
analytics.identify('id', { trait1: true, testObj: { k:'v' }, testArray: ['k', 'v'] });
analytics.called(window.clevertap.profile.push, { Site: { Identity:'id', trait1: true, testArray: ['k', 'v'] } });
analytics.identify('id', {
trait1: true,
testObj: { k: 'v' },
testArray: ['k', 'v']
});
analytics.called(window.clevertap.profile.push, {
Site: { Identity: 'id', trait1: true, testArray: ['k', 'v'] }
});
});

@@ -131,9 +148,15 @@ });

it('should send an event and properties', function() {
analytics.track('event', { property:true });
analytics.called(window.clevertap.event.push, 'event', { property:true });
analytics.track('event', { property: true });
analytics.called(window.clevertap.event.push, 'event', {
property: true
});
});
it('should drop nested object/array event properties', function() {
analytics.track('event', { prop:true, testObj:{ k:'v' }, testArray: ['k', 'v'] });
analytics.called(window.clevertap.event.push, 'event', { prop:true });
analytics.track('event', {
prop: true,
testObj: { k: 'v' },
testArray: ['k', 'v']
});
analytics.called(window.clevertap.event.push, 'event', { prop: true });
});

@@ -149,3 +172,5 @@ });

analytics.alias('aliasId');
analytics.called(window.clevertap.profile.push, { Site: { Identity:'aliasId' } });
analytics.called(window.clevertap.profile.push, {
Site: { Identity: 'aliasId' }
});
});

@@ -188,3 +213,3 @@ });

currency: 'USD',
'Charged ID':'50314b8e9bcf000000000002',
'Charged ID': '50314b8e9bcf000000000002',
Items: [

@@ -207,3 +232,3 @@ {

],
Amount:30
Amount: 30
});

@@ -210,0 +235,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc