{"id":13630279,"url":"https://github.com/dockwa/openpixel","last_synced_at":"2026-01-19T21:02:43.585Z","repository":{"id":8531832,"uuid":"56174793","full_name":"dockwa/openpixel","owner":"dockwa","description":"Openpixel is a customizable library for building web tracking pixels.","archived":false,"fork":false,"pushed_at":"2024-01-26T10:34:25.000Z","size":885,"stargazers_count":438,"open_issues_count":20,"forks_count":124,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-08-09T12:46:07.839Z","etag":null,"topics":["javascript","tracking-pixels","web-beacon"],"latest_commit_sha":null,"homepage":"https://engineering.dockwa.com","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/dockwa.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-13T18:05:09.000Z","updated_at":"2025-08-05T03:57:40.000Z","dependencies_parsed_at":"2024-05-30T06:44:36.962Z","dependency_job_id":null,"html_url":"https://github.com/dockwa/openpixel","commit_stats":{"total_commits":146,"total_committers":16,"mean_commits":9.125,"dds":0.6301369863013699,"last_synced_commit":"c28e436459d70ceec3ebe64e25ced1e6e6398646"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/dockwa/openpixel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockwa%2Fopenpixel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockwa%2Fopenpixel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockwa%2Fopenpixel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockwa%2Fopenpixel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dockwa","download_url":"https://codeload.github.com/dockwa/openpixel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockwa%2Fopenpixel/sbom","scorecard":{"id":349258,"data":{"date":"2025-08-11","repo":{"name":"github.com/dockwa/openpixel","commit":"fdc705c109017336c972e3c93c7944879077ac4f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"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":"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":"Code-Review","score":3,"reason":"Found 1/3 approved changesets -- score normalized to 3","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":"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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 28 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"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-897m-rjf5-jp39","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T07:53:55.482Z","repository_id":8531832,"created_at":"2025-08-18T07:53:55.483Z","updated_at":"2025-08-18T07:53:55.483Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28585220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["javascript","tracking-pixels","web-beacon"],"created_at":"2024-08-01T22:01:36.949Z","updated_at":"2026-01-19T21:02:43.549Z","avatar_url":"https://github.com/dockwa.png","language":"JavaScript","readme":"# Openpixel\n\u003ca href=\"https://www.npmjs.com/package/openpixel\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/openpixel.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/openpixel\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/openpixel.svg\" /\u003e\u003c/a\u003e\n\n[![Powered by Dockwa](https://raw.githubusercontent.com/dockwa/openpixel/dockwa/by-dockwa.png)](https://engineering.dockwa.com/)\n\n## About\nOpenpixel is a customizable JavaScript library for building tracking pixels. Openpixel uses the latest technologies available with fall back support for older browsers. For example, if the browser supports web beacons, openpixel will send a web beacon, if it doesn't support them it will inject a 1x1 gif into the page with tracking information as part of the images get request.\n\nAt Dockwa we built openpixel to solve our own problems of implementing a tracking service that our marinas could put on their website to track traffic and attribution to the reservations coming through our platform.\n\nOpenpixel handles the hard things about building a tracking library so you don't have to. It handles things like tracking unique users with cookies, tracking utm tags and persisting them to that users session, getting all of the information about the clients browser and device, and many other neat tricks for performant and accurate analytics.\n\nOpenpixel has two parts, the snippet (`snippet.html`), and the core (`openpixel.min.js`).\n\n### Snippet\nThe openpixel snippet (found at `dist/snippet.html`) is the HTML code that will be put onto any webpage that will be reporting analytics. For Dockwa, our marina websites put this on every page of their website so that it would load the JS to execute beacons back to a tracking server. The snippet can be placed anywhere on the page and it will load the core openpixel JS asynchronously. To be accurate, the first part of the snippet gets the timestamp as soon as it is loaded, applies an ID (just like a Google analytics ID, to be determined by you), and queues up a \"pageload\" event that will be sent as soon as the core JS has asynchronously loaded.\n\nThe snippet handles things like making sure the core JavaScript will always be loaded async and is cache busted every 24 hours so you can update the core and have customers using the updates within the next day.\n\n### Core\nThe openpixel core (found at `src/openpixel.min.js`) is the JavaScript code that that the snippet loads asynchronously onto the client's website. The core is what does all of the heavy lifting. The core handles settings cookies, collecting utms, and of course sending beacons and tracking pixels of data when events are called.\n\n### Events\nThere are 2 automatic events, the `pageload` event which is sent as the main event when a page is loaded, you could consider it to be a \"hit\". The other event is `pageclose` and this is sent when the pages is closed or navigated away from. For example, to calculate how long a user viewed a page, you could calculate the difference between the timestamps on pageload and pageclose and those timestamps will be accurate because they are triggered on the client side when the events actually happened.\n\nOpenpixel is flexible with events though, you can make calls to any events with any data you want to be sent with the beacon. Whenever an event is called, it sends a beacon just like the other beacons that have a timestamp and everything else. Here is an example of a custom event being called. Note: In this case we are using the `opix` function name but this will be custom based on your build of openpixel.\n\n```js\nopix('event', 'reservation_requested')\n```\nYou can also pass a string or json as the third parameter to send other data with the event.\n\n```js\nopix('event', 'reservation_requested', {someData: 1, otherData: 'cool'})\nopix('event', 'reservation_requested', {someData: 1, otherData: 'cool'})\n```\nYou can also add an attribute to any HTML element that will automatically fire the event on click.\n\n```html\n\u003cbutton data-opix-event=\"special-button-click\"\u003eSome Special Button\u003c/button\u003e\n```\n\n## Setup and Customize\nOpenpixel needs to be customized for your needs before you can start using it. Luckily for you it is really easy to do.\n\n1. Make sure you have [node.js](https://nodejs.org/en/download/) installed on your computer.\n2. Install openpixel `npm i openpixel`\n3. Install the dependencies for compiling openpixel via the command line with `npm install`\n4. Update the variables at the top of the `gulpfile.js` for your custom configurations. Each configuration has comments explaining it.\n5. Run gulp via the command `npm run dist`.\n\nThe core files and the snippet are located under the `src/` directory. If you are working on those files you can run `npm run watch` and that will watch for any files changed in the `src/` directory and rerun gulp to recompile these files and drop them in the `dist/` directory.\n\nThe `src/snippet.js` file is what is compiled into the `dist/snippet.html` file. All of the other files in the `src` directory are compiled into the `dist/openpixel.js` and the minified `dist/openpixel.min.js` files.\n\n## Continuous integration\nYou may also need to build different versions of openpixel for different environments with custom options.\nEnvironment variables can be used to configure the build:\n```\nOPIX_DESTINATION_FOLDER, OPIX_PIXEL_ENDPOINT, OPIX_JS_ENDPOINT, OPIX_VERSIONOPIX_PIXEL_FUNC_NAME, OPIX_VERSION, OPIX_HEADER_COMMENT\n```\n\nYou can install openpixel as an npm module `npm i -ED openpixel` and use it from your bash or js code.\n```\nOPIX_DESTINATION_FOLDER=/home/ubuntu/app/dist OPIX_PIXEL_ENDPOINT=http://localhost:8000/pixel.gif OPIX_JS_ENDPOINT=http://localhost:800/pixel_script.js  OPIX_PIXEL_FUNC_NAME=track-function OPIX_VERSION=1 OPIX_HEADER_COMMENT=\"// My custom tracker\\n\" npx gulp --gulpfile ./node_modules/openpixel/gulpfile.js build\n```\n\n## Tracking Data\nBelow is a table that has all of the keys, example values, and details on each value of information that is sent with each beacon on tracking pixel. A beacon might look something like this. Note: every key is always sent regardless of if it has a value so the structure will always be the same.\n\n```\nhttps://tracker.example.com/pixel.gif?id=R29X8\u0026uid=1-ovbam3yz-iolwx617\u0026ev=pageload\u0026ed=\u0026v=1\u0026dl=http://edgartownharbor.com/\u0026rl=\u0026ts=1464811823300\u0026de=UTF-8\u0026sr=1680x1050\u0026vp=874x952\u0026cd=24\u0026dt=Edgartown%20Harbormaster\u0026bn=Chrome%2050\u0026md=false\u0026ua=Mozilla/5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_11_5)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/50.0.2661.102%20Safari/537.36\u0026utm_source=\u0026utm_medium=\u0026utm_term=\u0026utm_content=\u0026utm_campaign=\n```\n\n| Key          | Value               | Details                                                         |\n| ------------ | ------------------- | --------------------------------------------------------------- |\n| id           | SJO12ZW             | id for the app/website you are tracking                         |\n| uid          | 1-cwq4oelu-in95g8xy | id of the user                                                  |\n| ev           | pageload            | the event that is being triggered                               |\n| ed           | {'somedata': 123}   | optional event data that can be passed in, string or json string|\n| v            | 1                   | openpixel js version number                                     |\n| dl           | http://example.com/ | document location                                               |\n| rl           | http://google.com/  | referrer location                                               |\n| ts           | 1461175033655       | timestamp in microseconds                                       |\n| de           | UTF-8               | document encoding                                               |\n| sr           | 1680x1050           | screen resolution                                               |\n| vp           | 1680x295            | viewport                                                        |\n| cd           | 24                  | color depth                                                     |\n| dt           | Example Title       | document title                                                  |\n| bn           | Chrome 50           | browser name                                                    |\n| md           | false               | mobile device                                                   |\n| ua           | _full user agent_   | user agent                                                      |\n| tz           | 240                 | timezone offset (minutes away from utc)                         |\n| utm_source   |                     | Campaign Source                                                 |\n| utm_medium   |                     | Campaign Medium                                                 |\n| utm_term     |                     | Campaign Term                                                   |\n| utm_content  |                     | Campaign Content                                                |\n| utm_campaign |                     | Campaign Name                                                   |\n| utm_source_platform |              | Source platform                                                 |\n| utm_creative_format |              | Creative format                                                 |\n| utm_marketing_tactic |             | Marketing tactic                                                |\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockwa%2Fopenpixel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdockwa%2Fopenpixel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockwa%2Fopenpixel/lists"}