{"id":15381934,"url":"https://github.com/justinribeiro/ga-dnt-analytics","last_synced_at":"2026-01-14T03:42:55.621Z","repository":{"id":57741346,"uuid":"79167298","full_name":"justinribeiro/ga-dnt-analytics","owner":"justinribeiro","description":"Basic Google Analytics web component with Do Not Track support.","archived":true,"fork":false,"pushed_at":"2017-07-07T22:37:26.000Z","size":2598,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T19:18:23.079Z","etag":null,"topics":["donottrack","google-analytics","polymer-element","polymer2","webcomponent"],"latest_commit_sha":null,"homepage":"https://www.webcomponents.org/element/justinribeiro/ga-dnt-analytics","language":"HTML","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/justinribeiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-16T23:00:01.000Z","updated_at":"2025-03-19T18:24:29.000Z","dependencies_parsed_at":"2022-09-07T15:51:43.569Z","dependency_job_id":null,"html_url":"https://github.com/justinribeiro/ga-dnt-analytics","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/justinribeiro/ga-dnt-analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fga-dnt-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fga-dnt-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fga-dnt-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fga-dnt-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinribeiro","download_url":"https://codeload.github.com/justinribeiro/ga-dnt-analytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fga-dnt-analytics/sbom","scorecard":{"id":544119,"data":{"date":"2025-08-11","repo":{"name":"github.com/justinribeiro/ga-dnt-analytics","commit":"807b2be9a89f245bb7d84eaed0f4ab7a42aef1e1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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-20T09:00:15.518Z","repository_id":57741346,"created_at":"2025-08-20T09:00:15.518Z","updated_at":"2025-08-20T09:00:15.518Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["donottrack","google-analytics","polymer-element","polymer2","webcomponent"],"created_at":"2024-10-01T14:29:19.986Z","updated_at":"2026-01-14T03:42:55.595Z","avatar_url":"https://github.com/justinribeiro.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \\\u003cga-dnt-analytics\\\u003e\n\nBasic Google Analytics web component with Do Not Track support. [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/justinribeiro/ga-dnt-analytics)\n\n\n\u003c!---\n```\n\u003ccustom-element-demo\u003e\n  \u003ctemplate\u003e\n    \u003cscript src=\"../webcomponentsjs/webcomponents-lite.js\"\u003e\u003c/script\u003e\n    \u003clink rel=\"import\" href=\"ga-dnt-analytics.html\"\u003e\n    \u003cnext-code-block\u003e\u003c/next-code-block\u003e\n  \u003c/template\u003e\n\u003c/custom-element-demo\u003e\n```\n--\u003e\n```html\n\u003cga-dnt-analytics debug=\"true\"\u003e\u003c/ga-dnt-analytics\u003e\nga-dnt-analytics - Open DevTools and check console.\n```\n\n![image](https://cloud.githubusercontent.com/assets/643503/22002837/e9e55dd8-dc03-11e6-8f3b-147be85ae76f.png)\n\n## Installation\n\nInstall the component using Bower:\n\n```shell\nbower i justinribeiro/ga-dnt-analytics --save\n```\n\n## Usage\n\n1. Import Web Components' polyfill, if needed:\n\n    ```html\n    \u003cscript src=\"bower_components/webcomponentsjs/webcomponents-loader.js\"\u003e\u003c/script\u003e\n    ```\n\n2. Import ga-dnt-analytics:\n\n    ```html\n    \u003clink rel=\"import\" href=\"bower_components/ga-dnt-analytics/ga-dnt-analytics.html\"/\u003e\n    ```\n\n3. Start using it!\n\n    ```html\n    \u003cga-dnt-analytics key=\"UA-XXXXXX-X\"\u003e\u003c/ga-dnt-analytics\u003e\n    ```\n\n\n## Attributes/Properties\n\nAttribute | Options      | Default  | Description\n---       | ---          | ---      | ---\n`key`     | *String*     | \"\"       | (_optional_) Sets UA for Google Analytics tracking\n`debug`   | *Boolean*    | `false`  | (_optional_) Enables Google Analytics debugging mode\n`trace`   | *Boolean*    | `false`  | (_optional_) Use with debug; enables full tracing for GA\n`donottrack` | *Boolean*  | `true`   | (_optional_) Check and use Do Not Track browser flag\n`pageview`    | *Boolean*    | `false`   | (_optional_) Send `ga('send', 'pageview')` ping on element stamp\n\n## Methods\n\nIf not using the `pageview` property to send a ping to GA, you can use the `send()` method to send a payload to GA.\n\n```javascript\n// via Polymer 2.x\nthis.shadowRoot.querySelector('ga-dnt-analytics').send({\n  hitType: 'pageview',\n  page: window.location.pathname,\n  location: window.location.href,\n  title: 'My Title'\n});\n\n// via Polymer 1.x\nthis.$$('ga-dnt-analytics').send({\n  hitType: 'pageview',\n  page: window.location.pathname,\n  location: window.location.href,\n  title: 'My Title'\n});\n\n// via JavaScript\ndocument.querySelector('ga-dnt-analytics').send({\n  hitType: 'pageview',\n  page: window.location.pathname,\n  location: window.location.href,\n  title: 'My Title'\n});\n```\n\nFor list of payloads and string/objects to send, see [See https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits](https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits).\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Credits\n\n[Justin Ribeiro](https://github.com/justinribeiro)\n[Schalk Neethling](https://github.com/schalkneethling)\n[Google Analytics](https://developers.google.com/analytics/)\n\n## License\n\nMIT License (MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinribeiro%2Fga-dnt-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinribeiro%2Fga-dnt-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinribeiro%2Fga-dnt-analytics/lists"}