{"_id":"@analytics/countly","_rev":"1-f51b4001a5d07bbb24c15e9e0d6e75cf","name":"@analytics/countly","dist-tags":{"latest":"0.21.12"},"versions":{"0.21.11":{"name":"@analytics/countly","version":"0.21.11","description":"Countly plugin for 'analytics' module","projectMeta":{"provider":{"name":"Countly","url":"https://count.ly/"},"platforms":{"browser":"./src/browser.js","node":"./src/node.js"}},"keywords":["analytics","analytics-project","analytics-plugin","countly"],"author":{"name":"Furkan Başaran","email":"fb@count.ly"},"license":"MIT","scripts":{"docs":"node ../analytics-cli/bin/run docs","build":"node ../../scripts/build/index.js","watch":"node ../../scripts/build/_watch.js","release:patch":"npm version patch && npm publish","release:minor":"npm version minor && npm publish","release:major":"npm version major && npm publish","es":"../../node_modules/.bin/babel-node ./testBabel.js"},"main":"lib/analytics-plugin-countly.cjs.js","globalName":"analyticsCountly","jsnext:main":"lib/analytics-plugin-countly.es.js","module":"lib/analytics-plugin-countly.es.js","browser":{"./lib/analytics-plugin-countly.cjs.js":"./lib/analytics-plugin-countly.browser.cjs.js","./lib/analytics-plugin-countly.es.js":"./lib/analytics-plugin-countly.browser.es.js"},"homepage":"https://github.com/DavidWells/analytics#readme","repository":{"type":"git","url":"git+https://github.com/DavidWells/analytics.git"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1"},"gitHead":"bc87e82df107fa775ceb8b5b5aec5d45e5daf976","bugs":{"url":"https://github.com/DavidWells/analytics/issues"},"_id":"@analytics/countly@0.21.11","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-jumyh6uXO/aInoZvh6Zqo67GwIbLYnujSzk7UuAhSHtw9shZ5XvC/7KXyc+vyxpARD+PIf9C99JWOwZinqVnpg==","shasum":"230aa46b23d10d2624b712a425f4f1532cc0725f","tarball":"https://registry.npmjs.org/@analytics/countly/-/countly-0.21.11.tgz","fileCount":8,"unpackedSize":31272,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/zQvhBxkOP/vGVPwYREtm6goVrxtDOiHOgenDDkjPjgIhAIKKqaumYDA5zgPgYnI+JlguV+vOYlXicMy+iAqwx5lN"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja0kvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCYA/6AkJufzjVL7eN7t9GLkpTRd5KlwWIwnoKKy31hvSjg1jqC183\r\nN6WBfZZcLrxop6ww9XP8r6ZEZ1yEKEVpbM7qNhRNqro5MAcf/midexanSCd1\r\nn/DsZqH1SEdI+yilLJRVswI2tRlofmH58ixS44+los5h2/f+LIndu8YxGuU2\r\n+l1nIW/Oi+xJwE0fasHVHteNZ4QvU0CuWnsEE4hpGD6bxPr59kXNPcc8xUFI\r\n6NmBzdEE09rz3wk+ulSJ2Z1DRQusDgCaamhz3aOjrPwoF7uua1xgVOSsP2Su\r\nvAXg4CWHmOMqPnluTHy8Mixr1J0m3U0bvpPcR5pVNO8wyGyKOw/nv67fvs5t\r\nNHdLuWh/S2dwRbuBfkHXvdLRMrOdHh69jFeKH+qpOr7I036ffIIbrfBJgJUP\r\nBtwIML0Y1aoJsT8sWmTVYYMGpox6D5Dy7/hCFOLDv4v/Uw/bHrc43kfaGgv1\r\nMXsjX47di56Z+m6aE7rpdlDnzQbFMsI+3nu3BQoo2ab83vCXUoC9AWAYP2oH\r\nUJUZq4HC9umVf3kIeJ5hK08naLdb2Vyjw6q9sviyyYCdDxDMVUyUVR5XN9k2\r\nAOyxazk3cxukoGLms9wQihOK/EgBNWWCXslrry2CuXZP0dUp7OfrSgAkJxLu\r\n1as/fDDseC/hFNdJtSUqNC8I0aTslckVRgg=\r\n=Kwh0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"davidwells","email":"davidgregorywells@gmail.com"},"directories":{},"maintainers":[{"name":"davidwells","email":"davidgregorywells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/countly_0.21.11_1667975470910_0.08389283904986367"},"_hasShrinkwrap":false},"0.21.12":{"name":"@analytics/countly","version":"0.21.12","description":"Countly plugin for 'analytics' module","projectMeta":{"provider":{"name":"Countly","url":"https://count.ly/"},"platforms":{"browser":"./src/browser.js","node":"./src/node.js"}},"keywords":["analytics","analytics-project","analytics-plugin","countly"],"author":{"name":"Furkan Başaran","email":"fb@count.ly"},"license":"MIT","scripts":{"docs":"node ../analytics-cli/bin/run docs","build":"node ../../scripts/build/index.js","watch":"node ../../scripts/build/_watch.js","release:patch":"npm version patch && npm publish","release:minor":"npm version minor && npm publish","release:major":"npm version major && npm publish","es":"../../node_modules/.bin/babel-node ./testBabel.js"},"main":"lib/analytics-plugin-countly.cjs.js","globalName":"analyticsCountly","jsnext:main":"lib/analytics-plugin-countly.es.js","module":"lib/analytics-plugin-countly.es.js","browser":{"./lib/analytics-plugin-countly.cjs.js":"./lib/analytics-plugin-countly.browser.cjs.js","./lib/analytics-plugin-countly.es.js":"./lib/analytics-plugin-countly.browser.es.js"},"homepage":"https://github.com/DavidWells/analytics#readme","repository":{"type":"git","url":"git+https://github.com/DavidWells/analytics.git"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1"},"gitHead":"fbcef082788db722f7a597c5948f24b3ec03f988","bugs":{"url":"https://github.com/DavidWells/analytics/issues"},"_id":"@analytics/countly@0.21.12","_nodeVersion":"16.15.1","_npmVersion":"lerna/3.22.1/node@v16.15.1+arm64 (darwin)","dist":{"integrity":"sha512-btrqO2PxjxgqN1VZVeUdRv+AurG2eu9JVH12oFMT5uLaaX5tMiAluJ1wrZAktHDJOcKsDc5bPG/c9ZHQp9We+Q==","shasum":"5665a8845a59e3a9f9167403ca120f6d43bcde7f","tarball":"https://registry.npmjs.org/@analytics/countly/-/countly-0.21.12.tgz","fileCount":10,"unpackedSize":32938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICeT+l+SaVdIH8tMx+7nOwhcHnH0xdkYCwy3wqj6goMnAiEA+Tg/sBZrW1m0qu+MNUP+KFbk/+Tn+/TZ3J1WnLIYKxY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja0mQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYnA//aGruo7gU6UtloIo88c1dVw8+pd/WGjcjYGoOaCo71x2FkrHL\r\n9313RqyxpmeH6XGzB+FX7SxI2SDqEhfuSU8nn3QKN25afpDc93CxkGU7yAan\r\n2wJEFc2PChOX/iAFeEdD+ITJ/AVkzd86UujNR1kuL3EBoylffiG0BtAF3jZw\r\n2KXQ1ZiVhUHYf41OQscPyZj78Sk9ORkd30KLi74xzB4JJQuCXqLkDLsKX6rH\r\nFHoSYNU0XW6Kmh6ykzhUmlqz8nv6QNRAVNVOnpxN/ieuZEqkAqMTbHxEGVsV\r\n+wdXgqbZXbKCMHPS3Y+DBiQp6bCA/C3JiBK+g6pHD6nuOOFQDnmEdcVFsROR\r\n802EujZDK9FRcy9ry5CzYT0qX/lB2igXeBhFfOSFhL3h1shphDqHw9m7a/5f\r\n4x9NqeiHVFaQoo+rjreNjAd4nHtbZS6oOAt4wjv4ogij8DcUihHkOIm4Vm96\r\nc6JIi4bhib1bvEZ2IC48w+jeLuA12LdZ1THwHpmkYZ//tQ6wvz7RO/WNPJeO\r\n/9X8fIwJjRQ3Ww/AXlVip4pijOlDisU04yNM4zhqybw24bm/cDjdWnoG9gpQ\r\nxX00FVHvmgTFsjaEPeQoyWrnc4GVmc/caqMQA2zvr+QzCNOWktpvnNezweHG\r\nXvmy4C6UkSuq0JsUyCGkQTovXuFVXVHXzk4=\r\n=6Ig7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"davidwells","email":"davidgregorywells@gmail.com"},"directories":{},"maintainers":[{"name":"davidwells","email":"davidgregorywells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/countly_0.21.12_1667975568614_0.48502265688283175"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-09T06:31:10.810Z","0.21.11":"2022-11-09T06:31:11.120Z","modified":"2022-11-09T06:32:48.868Z","0.21.12":"2022-11-09T06:32:48.789Z"},"maintainers":[{"name":"davidwells","email":"davidgregorywells@gmail.com"}],"description":"Countly plugin for 'analytics' module","homepage":"https://github.com/DavidWells/analytics#readme","keywords":["analytics","analytics-project","analytics-plugin","countly"],"repository":{"type":"git","url":"git+https://github.com/DavidWells/analytics.git"},"author":{"name":"Furkan Başaran","email":"fb@count.ly"},"bugs":{"url":"https://github.com/DavidWells/analytics/issues"},"license":"MIT","readme":"<!--\ntitle: Countly\ndescription: Using the Countly analytics plugin\n-->\n# Countly plugin for `analytics`\n\nIntegration with Countly for [analytics](https://www.npmjs.com/package/analytics)\n\nThis analytics plugin will load Countly library and allow to send tracking sessions, views, clicks, custom events, user data, etc.\n\n[View the docs](https://getanalytics.io/plugins/countly/)\n\n## Installation\n\n```bash\nnpm install analytics\nnpm install @analytics/countly\n```\n\n<!-- AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Click to expand) -->\n<details>\n<summary>Click to expand</summary>\n\n- [Installation](#installation)\n- [Installation](#installation-1)\n- [How to use](#how-to-use)\n- [Platforms Supported](#platforms-supported)\n- [Browser usage](#browser-usage)\n  - [Browser API](#browser-api)\n  - [Configuration options for browser](#configuration-options-for-browser)\n- [Server-side usage](#server-side-usage)\n  - [Server-side API](#server-side-api)\n  - [Configuration options for server-side](#configuration-options-for-server-side)\n- [Additional examples](#additional-examples)\n\n</details>\n<!-- AUTO-GENERATED-CONTENT:END -->\n\n## Installation\n\n```bash\nnpm install analytics\nnpm install @analytics/amplitude\n```\n\n<!-- AUTO-GENERATED-CONTENT:START (PLUGIN_DOCS) -->\n\n## How to use\n\nThe `@analytics/countly` package works in [the browser](#browser-usage) and [server-side in Node.js](#server-side-usage). To use, install the package, include in your project and initialize the plugin with [analytics](https://www.npmjs.com/package/analytics).\n\nBelow is an example of how to use the browser plugin.\n\n```js\nimport Analytics from 'analytics'\nimport countlyPlugin from '@analytics/countly'\n\nconst analytics = Analytics({\n  app: 'awesome-app',\n  plugins: [\n    countlyPlugin({\n      app_key: 'YOUR_APP_KEY',\n      server_url: 'https://YOUR_COUNTLY_SERVER_URL',\n      remote_config: true,\n      require_consent: true\n    })\n  ]\n})\n\n/* Track a page view */\nanalytics.page()\n\n/* Track a custom event */\nanalytics.track('cartCheckout', {\n  item: 'pink socks',\n  price: 20\n})\n\n/* Identify a visitor */\nanalytics.identify('user-id-xyz', {\n  firstName: 'bill',\n  lastName: 'murray'\n})\n\n```\n\nAfter initializing `analytics` with the `countlyPlugin` plugin, data will be sent into Countly whenever [analytics.page](https://getanalytics.io/api/#analyticspage), [analytics.track](https://getanalytics.io/api/#analyticstrack), or [analytics.identify](https://getanalytics.io/api/#analyticsidentify) are called.\n\nSee [additional implementation examples](#additional-examples) for more details on using in your project.\n\n## Platforms Supported\n\nThe `@analytics/countly` package works in [the browser](#browser-usage) and [server-side in Node.js](#server-side-usage)\n\n## Browser usage\n\nThe Countly client side browser plugin works with these analytic api methods:\n\n- **[analytics.identify](https://getanalytics.io/api/#analyticsidentify)** - Identify visitors and send details to Countly\n- **[analytics.page](https://getanalytics.io/api/#analyticspage)** - Sends page views into Countly\n- **[analytics.track](https://getanalytics.io/api/#analyticstrack)** - Track custom events and send to Countly\n- **[analytics.reset](https://getanalytics.io/api/#analyticsreset)** - Reset browser storage cookies & localstorage for Countly values\n\n### Browser API\n\n```js\nimport Analytics from 'analytics'\nimport countlyPlugin from '@analytics/countly'\n\nconst analytics = Analytics({\n  app: 'awesome-app',\n  plugins: [\n    countlyPlugin({\n      app_key: 'YOUR_APP_KEY',\n      server_url: 'https://YOUR_COUNTLY_SERVER_URL',\n      remote_config: true,\n      require_consent: true\n    })\n  ]\n})\n\n```\n\n### Configuration options for browser\n\n| Option | description |\n|:---------------------------|:-----------|\n| `app_key` <br/>**required** - string| Your app key from Countly |\n| `server_url` <br/>**required** - string| Url of the Countly server |\n| `remote_config` <br/>**required** - boolean| Remote config enabler flag |\n| `require_consent` <br/>**required** - boolean| Disable tracking until given consent (default: false) |\n\n## Server-side usage\n\nThe Countly server-side node.js plugin works with these analytic api methods:\n\n- **[analytics.page](https://getanalytics.io/api/#analyticspage)** - Sends page views into Countly\n- **[analytics.track](https://getanalytics.io/api/#analyticstrack)** - Track custom events and send to Countly\n- **[analytics.identify](https://getanalytics.io/api/#analyticsidentify)** - Identify visitors and send details to Countly\n\n### Server-side API\n\n```js\nimport Analytics from 'analytics'\nimport countlyPlugin from '@analytics/countly'\n\nconst analytics = Analytics({\n  app: 'awesome-app',\n  plugins: [\n    countly({\n      app_key: 'your_app_key',\n      server_url: 'https://your_countly_server_url',\n      debug: true\n    })\n  ]\n})\n\n```\n\n### Configuration options for server-side\n\n| Option | description |\n|:---------------------------|:-----------|\n| `app_key` <br/>**required** - string| Your app key from Countly |\n| `server_url` <br/>**required** - string| Url of the Countly server |\n| `debug` <br/>**required** - boolean| Set debug flag |\n\n\n## Additional examples\n\nBelow are additional implementation examples.\n\n<details>\n  <summary>Server-side ES6</summary>\n\n  ```js\n  import Analytics from 'analytics'\n  import countlyPlugin from '@analytics/countly'\n\n  const analytics = Analytics({\n    app: 'awesome-app',\n    plugins: [\n      countly({\n        app_key: 'your_app_key',\n        server_url: 'https://your_countly_server_url',\n        debug: true\n      })\n      // ...other plugins\n    ]\n  })\n\n  /* Track a page view */\n  analytics.page()\n\n  /* Track a custom event */\n  analytics.track('cartCheckout', {\n    item: 'pink socks',\n    price: 20\n  })\n\n  /* Identify a visitor */\n  analytics.identify('user-id-xyz', {\n    firstName: 'bill',\n    lastName: 'murray'\n  })\n\n  ```\n\n</details>\n\n<details>\n  <summary>Server-side Node.js with common JS</summary>\n\n  If using node, you will want to import the `.default`\n\n  ```js\n  const analyticsLib = require('analytics').default\n  const countlyPlugin = require('@analytics/countly').default\n\n  const analytics = analyticsLib({\n    app: 'my-app-name',\n    plugins: [\n      countly({\n        app_key: 'your_app_key',\n        server_url: 'https://your_countly_server_url',\n        debug: true\n      })\n    ]\n  })\n\n  /* Track a page view */\n  analytics.page()\n\n  /* Track a custom event */\n  analytics.track('cartCheckout', {\n    item: 'pink socks',\n    price: 20\n  })\n\n  /* Identify a visitor */\n  analytics.identify('user-id-xyz', {\n    firstName: 'bill',\n    lastName: 'murray'\n  })\n\n  ```\n\n</details>\n\n<details>\n  <summary>Using in HTML</summary>\n\n  Below is an example of importing via the unpkg CDN. Please note this will pull in the latest version of the package.\n\n  ```html\n  <!DOCTYPE html>\n  <html>\n    <head>\n      <title>Using @analytics/countly in HTML</title>\n      <script src=\"https://unpkg.com/analytics/dist/analytics.min.js\"></script>\n      <script src=\"https://unpkg.com/@analytics/countly/dist/@analytics/countly.min.js\"></script>\n      <script type=\"text/javascript\">\n        /* Initialize analytics */\n        var Analytics = _analytics.init({\n          app: 'my-app-name',\n          plugins: [\n            analyticsCountly({\n              app_key: 'YOUR_APP_KEY',\n              server_url: 'https://YOUR_COUNTLY_SERVER_URL',\n              remote_config: true,\n              require_consent: true\n            })\n          ]\n        })\n\n        /* Track a page view */\n        analytics.page()\n\n        /* Track a custom event */\n        analytics.track('cartCheckout', {\n          item: 'pink socks',\n          price: 20\n        })\n\n        /* Identify a visitor */\n        analytics.identify('user-id-xyz', {\n          firstName: 'bill',\n          lastName: 'murray'\n        })\n      </script>\n    </head>\n    <body>\n      ....\n    </body>\n  </html>\n\n  ```\n\n</details>\n\n<details>\n  <summary>Using in HTML via ES Modules</summary>\n\n  Using `@analytics/countly` in ESM modules.\n\n  ```html\n  <!DOCTYPE html>\n  <html>\n    <head>\n      <title>Using @analytics/countly in HTML via ESModules</title>\n      <script>\n        // Polyfill process.\n        // **Note**: Because `import`s are hoisted, we need a separate, prior <script> block.\n        window.process = window.process || { env: { NODE_ENV: 'production' } }\n      </script>\n      <script type=\"module\">\n        import analytics from 'https://unpkg.com/analytics/lib/analytics.browser.es.js?module'\n        import analyticsCountly from 'https://unpkg.com/@analytics/countly/lib/analytics-plugin-countly.browser.es.js?module'\n        /* Initialize analytics */\n        const Analytics = analytics({\n          app: 'analytics-html-demo',\n          debug: true,\n          plugins: [\n            analyticsCountly({\n              app_key: 'YOUR_APP_KEY',\n              server_url: 'https://YOUR_COUNTLY_SERVER_URL',\n              remote_config: true,\n              require_consent: true\n            })\n            // ... add any other third party analytics plugins\n          ]\n        })\n\n        /* Track a page view */\n        analytics.page()\n\n        /* Track a custom event */\n        analytics.track('cartCheckout', {\n          item: 'pink socks',\n          price: 20\n        })\n\n        /* Identify a visitor */\n        analytics.identify('user-id-xyz', {\n          firstName: 'bill',\n          lastName: 'murray'\n        })\n      </script>\n    </head>\n    <body>\n      ....\n    </body>\n  </html>\n\n  ```\n\n</details>\n\n\n<!-- AUTO-GENERATED-CONTENT:END (PLUGIN_DOCS) -->","readmeFilename":"README.md"}