{"id":30312730,"url":"https://github.com/mparticle/mparticle-node-sdk","last_synced_at":"2025-08-17T17:14:25.947Z","repository":{"id":46049907,"uuid":"78892343","full_name":"mParticle/mparticle-node-sdk","owner":"mParticle","description":"Node JS SDK for the mParticle Platform","archived":false,"fork":false,"pushed_at":"2023-04-17T20:15:43.000Z","size":101,"stargazers_count":3,"open_issues_count":8,"forks_count":5,"subscribers_count":14,"default_branch":"master","last_synced_at":"2023-08-06T23:21:33.787Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mParticle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-13T22:39:51.000Z","updated_at":"2022-12-26T23:55:12.000Z","dependencies_parsed_at":"2023-01-24T20:15:15.864Z","dependency_job_id":null,"html_url":"https://github.com/mParticle/mparticle-node-sdk","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"purl":"pkg:github/mParticle/mparticle-node-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mParticle%2Fmparticle-node-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mParticle%2Fmparticle-node-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mParticle%2Fmparticle-node-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mParticle%2Fmparticle-node-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mParticle","download_url":"https://codeload.github.com/mParticle/mparticle-node-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mParticle%2Fmparticle-node-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270877422,"owners_count":24661139,"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-17T02:00:09.016Z","response_time":129,"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":"2025-08-17T17:14:24.994Z","updated_at":"2025-08-17T17:14:25.928Z","avatar_url":"https://github.com/mParticle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"http://static.mparticle.com/sdk/logo.svg\" width=\"280\"\u003e\n\n## mParticle Node SDK\n\nThis is the mParticle Node SDK - use it to send your data to the [mParticle platform](https://www.mparticle.com/) and off to 100+ data services.\n\n### Requirements\n\nNode JS 4.2.2 or later.\n\n### Installation\n\n```sh\nnpm install mparticle\n```\n\n## Usage\n\n```javascript\nvar mParticle = require('mparticle');\n\nvar api = new mParticle.EventsApi(new mParticle.Configuration(\n    'REPLACE WITH API KEY', \n    'REPLACE WITH API SECRET'));\n\nvar batch = new mParticle.Batch(mParticle.Batch.Environment.development);\n\nbatch.user_identities = new mParticle.UserIdentities();\nbatch.user_identities.customerid = '123456' // identify the user (required)\n\nbatch.user_attributes = {'hair color': 'brown'}\n\nvar event = new mParticle.AppEvent(mParticle.AppEvent.CustomEventType.navigation, \n  'Hello World');\n\nbatch.addEvent(event);\n\nvar body = [batch]; // {[Batch]} Up to 100 Batch objects\n\nvar callback = function(error, data, response) {\n  if (error) {\n    console.error(error);\n  } else {\n    console.log('API called successfully.');\n  }\n};\n\napi.bulkUploadEvents(body, callback);\n\n// or upload a single batch\n//api.uploadEvents(body, batch) \n\n```\n\n### License\n\n[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmparticle%2Fmparticle-node-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmparticle%2Fmparticle-node-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmparticle%2Fmparticle-node-sdk/lists"}