{"id":18615593,"url":"https://github.com/hex-digital/vue-analytics-fb","last_synced_at":"2025-07-31T21:05:26.098Z","repository":{"id":57394441,"uuid":"144982226","full_name":"hex-digital/vue-analytics-fb","owner":"hex-digital","description":"Small wrapper around FBQ for analytics","archived":false,"fork":false,"pushed_at":"2018-08-16T12:29:37.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-27T03:12:26.691Z","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/hex-digital.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-16T12:04:57.000Z","updated_at":"2018-08-16T12:29:38.000Z","dependencies_parsed_at":"2022-09-05T06:31:30.953Z","dependency_job_id":null,"html_url":"https://github.com/hex-digital/vue-analytics-fb","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-digital%2Fvue-analytics-fb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-digital%2Fvue-analytics-fb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-digital%2Fvue-analytics-fb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex-digital%2Fvue-analytics-fb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex-digital","download_url":"https://codeload.github.com/hex-digital/vue-analytics-fb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406497,"owners_count":19633025,"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-11-07T03:30:43.194Z","updated_at":"2025-02-18T04:12:06.030Z","avatar_url":"https://github.com/hex-digital.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-analytics-fb\n\n[![npm](https://img.shields.io/npm/v/vue-analytics-fb.svg)](https://www.npmjs.com/package/vue-analytics-fb)\n\nA small wrapper around fbq. This package integrates Facebook pixel into your `Vue` app.\n\nThis is originally forked from wemake-services/vue-analytics-facebook-pixel, with the plan to expand it further.\n\n## Installation\n\n```bash\nnpm install vue-analytics-fb\n```\n\nAlso, this library requires installing [Facebook Pixel API](https://developers.facebook.com/docs/ads-for-websites/tag-api/).\n\n## Usage\n\n### Preparations\n\n```javascript\nimport Vue from 'Vue'\nimport VueFacebookPixel from 'vue-analytics-fb'\n\nVue.use(VueFacebookPixel)\n```\n\n### Calling API\n\nTo start using this script you will have to call `init(...)` first.\n\n```javascript\n/**\n * Init facebook tracking pixel\n * @param  {String} appId\n * @param  {object} [data={}]\n */\nVue.analytics.fbq.init('YOUR_FACEBOOK_CODE', {\n  em: 'user@mail.com'\n})\n```\n\nMake sure `init(...)` is called only once.\n\nThen you will have full access to the `event(...)` method.\n\n```javascript\n/**\n * Event tracking\n * @param  {String} name\n * @param  {object} [data={}]\n */\nVue.analytics.fbq.event('ViewContent', {\n  content_name: 'Really Fast Running Shoes'\n})\n```\n\n#### Inside component\n\nAll `component` instances can call `this.$analytics.fbq`\n\n## Naming convention\n\nAll `vue-analytics-*` share the same `analytics` object, where all the providers are stored.\n\n## Facebook script\n\n[Facebook Pixel API](https://developers.facebook.com/docs/ads-for-websites/tag-api/) is required to be installed. You can skip the default `window.fbq('init', 'KEY')` part and use `Vue.analytics.fbq.init(...)` which will do the same.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex-digital%2Fvue-analytics-fb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex-digital%2Fvue-analytics-fb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex-digital%2Fvue-analytics-fb/lists"}