{"id":22827435,"url":"https://github.com/voxaai/voxa-ga","last_synced_at":"2025-07-04T16:32:32.399Z","repository":{"id":19474232,"uuid":"87125840","full_name":"VoxaAI/voxa-ga","owner":"VoxaAI","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-05T06:42:09.000Z","size":656,"stargazers_count":1,"open_issues_count":25,"forks_count":5,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-23T13:36:53.192Z","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/VoxaAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-03T22:13:17.000Z","updated_at":"2020-02-07T17:41:31.000Z","dependencies_parsed_at":"2023-01-13T20:23:30.140Z","dependency_job_id":null,"html_url":"https://github.com/VoxaAI/voxa-ga","commit_stats":null,"previous_names":["mediarain/voxa-ga"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/VoxaAI/voxa-ga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxaAI%2Fvoxa-ga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxaAI%2Fvoxa-ga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxaAI%2Fvoxa-ga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxaAI%2Fvoxa-ga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VoxaAI","download_url":"https://codeload.github.com/VoxaAI/voxa-ga/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoxaAI%2Fvoxa-ga/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263577244,"owners_count":23483130,"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","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-12-12T18:10:35.088Z","updated_at":"2025-07-04T16:32:32.383Z","avatar_url":"https://github.com/VoxaAI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Voxa Google Analytics\n===========\n\n[![Build Status](https://travis-ci.org/mediarain/voxa-ga.svg?branch=master)](https://travis-ci.org/mediarain/voxa-ga)\n[![Coverage Status](https://coveralls.io/repos/github/mediarain/voxa-ga/badge.svg?branch=master)](https://coveralls.io/github/mediarain/voxa-ga?branch=master)\n\nA [Google Analytics](https://www.google.com/analytics) plugin for [voxa](https://mediarain.github.io/voxa/)\n\nInstallation\n-------------\n\nJust install from [npm](https://www.npmjs.com/package/voxa-ga)\n\n```bash\nnpm install --save voxa-ga\n```\n**Important! As of version 1.0, this plugin is designed to work with Analytic properties that are setup as Websites. Previously it was the opposite, working only with Mobile Analytics Properties.**\n\nUsage\n------\n\n```javascript\nrequire('voxa-ga')(skill,config.google_analytics);\n\n```\n\n### Options\n```javascript\n{\n  trackingId: \"UA-XXXXXX-X\", // Your app's tracking id\n\n  appName: \"hamurabi\", // The application name. If not provided, an attempt will be made to derive it\n  appVersion: \"1.1\", // The applications current version number. If not provided, an attempt will be made to derive it.\n\n  ignoreUsers: [], // An array of users that will be ignored. Useful for blacklisting dev or monitoring accounts from analytics\n  suppressSending: false, // A flag to supress sending hits. Useful while developing on the website\n  suppressSlots: ['phonenumber'], // An array of slots that shouldn't be logged automatically. Use to remove PII slots.\n}\n```\n\nWhat You Get\n--------\n\nBy attaching the plugin, for free you get the following\n* Track users by their Alexa user id\n* The paths of each response will be logged as a page view (e.g. Welcome.FirstTimeUser)\n* Events will be logged to track each\n  * Intent (category: \"Intents\", action: \"IntentName\")\n  * State (category: \"States\", action: \"state-name\")\n  * Slot (category: \"Slots\", action: \"slot-nmae\", label: \"slot-value\")\n* User timings will be logged for\n  * Request processing time (how much time your code takes)\n  * Each state's occupancy time \n* The device's capabilities (e.g. AudioPlayer) are logged it the flash-version variable\n* Session start/stop bookends\n* The user's locale\n* Exceptions (fatal or caught) are captured\n\nAdditionally a `ga` object is attached to the `alexaEvent` object, allowing you to log custom events.\n\n### Suppressing State Events\nSometimes smaller intermediary states are just not interesting to log. Suppress a state from logging as follows:\n```javascript\nskill.onState('my-state', alexaEvent =\u003e {\n  alexaEvent.ga.ignore();\n  return { reply: 'Greeting', to: 'my-next-state' };\n})\n```\n\n### Custom Events\nLog a custom event by invoking `.event` on the `ga` object\n```javascript\nskill.onState('my-state', alexaEvent =\u003e {\n  alexaEvent.ga.event('Category', 'Action', 'Label', Value)\n  return {reply: 'Greeting', to: 'my-next-state'};\n})\n```\n### Timing\nHave something to time? Use the `ga` object. Remember that the request and each state is already timed for you.\n```javascript\nskill.onState('my-state', alexaEvent =\u003e {\n  alexaEvent.ga.time('Category', 'Variable');\n  return longRunningOperation().then(() =\u003e {\n    alexaEvent.ga.timeEnd('Category', 'Variable');\n  }).then(finishIt);\n})\n```\n\n### Anything Else\nUse the visitor object to get access to a [universal analytics](https://www.npmjs.com/package/universal-analytics) object.\n```javascript\nskill.onState('my-state', alexaEvent =\u003e {\n  alexaEvent.ga.visitor.transaction('213');\n})\n```\n\n### Sending events\nThe plugin will automatically send hits at the end of each request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxaai%2Fvoxa-ga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxaai%2Fvoxa-ga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxaai%2Fvoxa-ga/lists"}