{"id":18426111,"url":"https://github.com/clevertap/clevertap-node","last_synced_at":"2025-08-20T20:32:35.841Z","repository":{"id":45928015,"uuid":"51385934","full_name":"CleverTap/clevertap-node","owner":"CleverTap","description":"A Node.js module for accessing the CleverTap Server API","archived":false,"fork":false,"pushed_at":"2025-07-07T11:07:49.000Z","size":189,"stargazers_count":7,"open_issues_count":4,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-09T03:22:11.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleverTap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-09T17:50:04.000Z","updated_at":"2025-03-23T16:17:32.000Z","dependencies_parsed_at":"2024-06-19T22:51:05.349Z","dependency_job_id":"165ac870-7e0a-4a66-baa1-9e7619dfa49d","html_url":"https://github.com/CleverTap/clevertap-node","commit_stats":{"total_commits":39,"total_committers":9,"mean_commits":4.333333333333333,"dds":0.717948717948718,"last_synced_commit":"9f7f1b7ca708f4d248c773970c97ce65cf55d173"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CleverTap/clevertap-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverTap%2Fclevertap-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverTap%2Fclevertap-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverTap%2Fclevertap-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverTap%2Fclevertap-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleverTap","download_url":"https://codeload.github.com/CleverTap/clevertap-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleverTap%2Fclevertap-node/sbom","scorecard":{"id":30625,"data":{"date":"2025-08-11","repo":{"name":"github.com/CleverTap/clevertap-node","commit":"9f7f1b7ca708f4d248c773970c97ce65cf55d173"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":3,"reason":"Found 4/11 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T19:00:55.932Z","repository_id":45928015,"created_at":"2025-08-14T19:00:55.932Z","updated_at":"2025-08-14T19:00:55.932Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271378680,"owners_count":24749192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T05:06:56.112Z","updated_at":"2025-08-20T20:32:35.470Z","avatar_url":"https://github.com/CleverTap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clevertap-node\n[![npm version](https://badge.fury.io/js/clevertap.svg)](https://badge.fury.io/js/clevertap)\n\n[![CI Status](https://app.travis-ci.com/CleverTap/clevertap-node.svg?branch=master)](https://app.travis-ci.com/CleverTap/clevertap-node)\n\nFully async Node.js server module for accessing the [CleverTap](https://clevertap.com/) Server API\n\n## Install\n\n`npm install clevertap`\n\n## Usage  \n\n```javascript\n\n// require the library\nconst CleverTap = require('clevertap');\n/**\n init the library with your CleverTap Account Id, CleverTap Account Passcode and CleverTap Account Region\n Clevertap Account Regions:\n EUROPE: 'eu1', // default for most accounts\n INDIA: 'in1',\n SINGAPORE: 'sg1',\n US: 'us1',\n INDONESIA: 'aps3',\n MIDDLEEAST: 'mec1'\n*/\nconst clevertap = CleverTap.init(YOUR_CLEVERTAP_ACCOUNT_ID, YOUR_CLEVERTAP_ACCOUNT_PASSCODE, CleverTap.REGIONS.EUROPE);\n\n// the library supports both callbacks and Promises\n\n/* Upload Profile or events */\nvar data = [\n  {\n    type: \"event\",\n    identity: \"6264372124\",\n    evtName: \"choseNewFavoriteFood\",\n    evtData: {\n      value: \"sushi\",\n    },\n  },\n\n  {\n    type: \"profile\",\n    identity: \"6264372124\",\n    ts: t,\n    profileData: {\n      favoriteColor: \"green\",\n      Age: 30,\n      Phone: \"+14155551234\",\n      Email: \"peter@foo.com\",\n    },\n  },\n\n  {\n    type: \"event\",\n    FBID: \"34322423\",\n    evtName: \"Product viewed\",\n    evtData: {\n      \"Product name\": \"Casio Chronograph Watch\",\n      Category: \"Mens Watch\",\n      Price: 59.99,\n      Currency: \"USD\",\n    },\n  },\n\n  {\n    type: \"profile\",\n    objectId: \"-2ce3cca260664f70b82b1c6bb505f462\",\n    profileData: { favoriteFood: \"hot dogs\" },\n  },\n\n  {\n    type: \"event\",\n    objectId: \"-2ce3cca260664f70b82b1c6bb505f462\",\n    evtName: \"choseNewFavoriteFood\",\n    evtData: {},\n  },\n\n  {\n    type: \"event\",\n    identity: \"jack@gmail.com\",\n    ts: t,\n    evtName: \"Charged\",\n    evtData: {\n      Amount: 300,\n      Currency: \"USD\",\n      \"Payment mode\": \"Credit Card\",\n      Items: [\n        {\n          Category: \"books\",\n          \"Book name\": \"The millionaire next door\",\n          Quantity: 1,\n        },\n        {\n          Category: \"books\",\n          \"Book name\": \"Achieving inner zen\",\n          Quantity: 4,\n        },\n      ],\n    },\n  },\n];\n// callback style\nclevertap.upload(data, { debug: 1, batchSize: 1000 }, (res) =\u003e {\n  console.log(res);\n});\n// or if you prefer Promises\nclevertap.upload(data, { debug: 1, batchSize: 1000 }).then((res) =\u003e {\n  console.log(res);\n});\n\n/* Get Events data */\nvar eventsQuery = {\n  event_name: \"choseNewFavoriteFood\",\n  props: [{ name: \"value\", operator: \"contains\", value: \"piz\" }],\n  from: 20150810,\n  to: 20151025,\n};\n// callback style\nclevertap.events(eventsQuery, { debug: 1, batchSize: 6000 }, (res) =\u003e {\n  console.log(res);\n});\n// or if you prefer Promises\nclevertap.events(eventsQuery, { debug: 1, batchSize: 6000 }).then((res) =\u003e {\n  console.log(res);\n});\n\n/* Get profile info */\n//callback style\nclevertap.profile(\n  { objectId: \"-2ce3cca260664f70b82b1c6bb505f462\", debug: 1 },\n  (res) =\u003e {\n    console.log(res);\n  }\n);\n// or if you prefer Promises\nclevertap\n  .profile({ objectId: \"-2ce3cca260664f70b82b1c6bb505f462\", debug: 1 })\n  .then((res) =\u003e {\n    console.log(res);\n  });\n\nvar profilesQuery = {\n  event_name: \"choseNewFavoriteFood\",\n  props: [{ name: \"value\", operator: \"contains\", value: \"piz\" }],\n  from: 20150810,\n  to: 20151025,\n};\n//callback style\nclevertap.profiles(profilesQuery, { debug: 1, batchSize: 200 }, (res) =\u003e {\n  console.log(res);\n});\n// or if you prefer Promises\nclevertap.profiles(profilesQuery, { debug: 1, batchSize: 200 }).then((res) =\u003e {\n  console.log(res);\n});\n\n/* Campaign API's - CREATE, ESTIMATE, LIST, RESULT, STOP, TARGET_ACTIONS */\nvar estimatePayload = {\n  name: \"green freedom\",\n  when: \"now\",\n  where: {\n    event_name: \"App Launched\",\n    from: 20160101,\n    to: 20160317,\n  },\n  content: {\n    title: \"Hello!\",\n    body: \"Strictly Green Lantern fans only!\",\n    platform_specific: {\n      ios: {\n        deep_link: \"judepereira.com\",\n        sound_file: \"judepereira.wav\",\n        category: \"reactive\",\n        badge_count: 1,\n        foo: \"bar_ios\",\n      },\n      android: {\n        background_image: \"http://judepereira.com/a.jpg\",\n        default_sound: true,\n        deep_link: \"judepereira.com\",\n        foo: \"bar_android\",\n      },\n    },\n  },\n  devices: [\"android\", \"ios\"],\n};\n//callback style\nclevertap.targets(\n  clevertap.TARGET_ESTIMATE,\n  estimatePayload,\n  { debug: 1 },\n  (res) =\u003e {\n    console.log(res);\n  }\n);\n// or if you prefer Promises\nclevertap\n  .targets(clevertap.TARGET_ESTIMATE, estimatePayload, { debug: 1 })\n  .then((res) =\u003e {\n    console.log(res);\n  });\n\nvar createPayload = {\n  name: \"green freedom\",\n  when: \"now\",\n  where: {\n    event_name: \"App Launched\",\n    from: 20160101,\n    to: 20160317,\n  },\n  content: {\n    title: \"Hello!\",\n    body: \"Strictly Green Lantern fans only!\",\n    platform_specific: {\n      ios: {\n        deep_link: \"judepereira.com\",\n        sound_file: \"judepereira.wav\",\n        category: \"reactive\",\n        badge_count: 1,\n        foo: \"bar_ios\",\n      },\n      android: {\n        background_image: \"http://judepereira.com/a.jpg\",\n        default_sound: true,\n        deep_link: \"judepereira.com\",\n        foo: \"bar_android\",\n      },\n    },\n  },\n  devices: [\"ios\"],\n};\n//callback style\nclevertap.targets(\n  clevertap.TARGET_CREATE,\n  createPayload,\n  { debug: 1 },\n  (res) =\u003e {\n    console.log(res);\n  }\n);\n// or if you prefer Promises\nclevertap\n  .targets(clevertap.TARGET_CREATE, createPayload, { debug: 1 })\n  .then((res) =\u003e { console.log(res); });\n\nvar listPayload = { from: 20160101, to: 20160317 };\n//callback style\nclevertap.targets(clevertap.TARGET_LIST, listPayload, { debug: 1 }, (res) =\u003e { console.log(res); });\n// or if you prefer Promises\nclevertap\n  .targets(clevertap.TARGET_LIST, listPayload, { debug: 1 })\n  .then((res) =\u003e {console.log(res);});\n\nvar stopPayload = { id: 1458261857 };\n//callback style\nclevertap.targets(clevertap.TARGET_STOP, stopPayload, { debug: 1 }, (res) =\u003e {console.log(res);});\n// or if you prefer Promises\nclevertap\n  .targets(clevertap.TARGET_STOP, stopPayload, { debug: 1 })\n  .then((res) =\u003e { console.log(res);});\n\nvar resultPayload = { id: 1458261857 };\n//callback style\nclevertap.targets(\n  clevertap.TARGET_RESULT,\n  resultPayload,\n  { debug: 1 },\n  (res) =\u003e {console.log(res);}\n);\n// or if you prefer Promises\nclevertap\n  .targets(clevertap.TARGET_RESULT, resultPayload, { debug: 1 })\n  .then((res) =\u003e {console.log(res);});\n\n/* Report API's */\n// Get Message Reports\nvar getMessageReportspayload = { from: \"20171101\", to: \"20171225\" };\nclevertap\n  .getMessageReports(getMessageReportspayload, { debug: 1 })\n  .then((res) =\u003e {console.log(res);});\n\n// This endpoint enables you to get a real-time count of active users in the past five minutes in your app\nvar realTimeCountspayload = { user_type: true };\nclevertap.realTimeCounts(realTimeCountspayload, { debug: 1 }).then((res) =\u003e {console.log(res);});\n\n// This endpoint is used to retrieve counts for the most and least frequently occurring properties for a particular event in a specified duration\nvar topPropertyCountspayload = {\n  event_name: \"Charged\",\n  from: 20161229,\n  to: 20170129,\n  groups: {\n    foo: {\n      property_type: \"event_properties\",\n      name: \"Amount\",\n    },\n    bar: {\n      property_type: \"profile_fields\",\n      name: \"Customer Type\",\n      top_n: 2,\n      order: \"asc\",\n    },\n  },\n};\nclevertap\n  .topPropertyCounts(topPropertyCountspayload, { debug: 1 })\n  .then((res) =\u003e {console.log(res);});\n\n// This endpoint is used to retrieve daily, weekly, and monthly event trends in a specified duration.\nvar trendspayload = {\n  event_name: \"Charged\",\n  from: 20161224,\n  to: 20170103,\n  unique: false,\n  sum_event_prop: \"Amount\",\n  groups: {\n    foo: {\n      trend_type: \"daily\",\n    },\n    bar: {\n      trend_type: \"weekly\",\n    },\n    foobar: {\n      trend_type: \"monthly\",\n    },\n  },\n};\nclevertap.trends(trendspayload, { debug: 1 }).then((res) =\u003e {console.log(res);});\n\n\n\n```\n\nSee [example.js](https://github.com/CleverTap/clevertap-node/blob/master/example.js) for more detailed usage.\n\nAlso please see our [Server API documentation](https://developer.clevertap.com/docs/api-overview).\n\n## Tests\n```\nnpm install  \nnpm test // all tests \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclevertap%2Fclevertap-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclevertap%2Fclevertap-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclevertap%2Fclevertap-node/lists"}