{"id":20206496,"url":"https://github.com/useflyyer/flyyer-ping","last_synced_at":"2026-04-13T17:31:50.224Z","repository":{"id":40710505,"uuid":"294945312","full_name":"useflyyer/flyyer-ping","owner":"useflyyer","description":"Script for analytics and pre-rendering Flayyer images simple as https://edge.flayyer.host/v2/pixel.gif","archived":false,"fork":false,"pushed_at":"2022-12-11T18:49:15.000Z","size":1053,"stargazers_count":3,"open_issues_count":33,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-30T22:49:31.986Z","etag":null,"topics":["analytics","flayyer","image-generator","javascript","lerna","open-graph","react","twitter-cards","typescript"],"latest_commit_sha":null,"homepage":"https://flayyer.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/useflyyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-12T13:05:04.000Z","updated_at":"2023-10-27T20:58:20.000Z","dependencies_parsed_at":"2023-01-27T05:00:22.649Z","dependency_job_id":null,"html_url":"https://github.com/useflyyer/flyyer-ping","commit_stats":null,"previous_names":["flayyer/flayyer-ping"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/useflyyer/flyyer-ping","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fflyyer-ping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fflyyer-ping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fflyyer-ping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fflyyer-ping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/useflyyer","download_url":"https://codeload.github.com/useflyyer/flyyer-ping/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fflyyer-ping/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273554284,"owners_count":25126312,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":["analytics","flayyer","image-generator","javascript","lerna","open-graph","react","twitter-cards","typescript"],"created_at":"2024-11-14T05:24:29.548Z","updated_at":"2026-04-13T17:31:45.190Z","avatar_url":"https://github.com/useflyyer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flayyer Ping\n\nMonitor and pre-render [Flayyer URLs](https://flayyer.com?ref=github)\n\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n## Concept\n\n**This is very similar to Facebook Pixel.**\n\nThis lightweight script with zero dependencies reads the `\u003chead\u003e` of your HTML and if it finds a Flayyer URL in the contents of `og:image` or `twitter:image` it will ping one of our Flayyer severs to pre-render them (if were not rendered before) and to track some information to measure the impact of those images.\n\nThe easiest way of using this script is via a `\u003cscript\u003e` tag at the end of the `\u003cbody\u003e` element. Here is an example:\n\n```html\n\u003cscript async defer src=\"https://unpkg.com/@flayyer/ping-script/dist/ping.min.js\"\u003e\u003c/script\u003e\n\u003cnoscript\u003e\n  \u003cimg src=\"https://edge.flayyer.com/v2/ping.gif\" alt=\"\"/\u003e\n\u003c/noscript\u003e\n```\n\nSo a fully-featured but also minimalist site using Flayyer should look like this:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\" prefix=\"og: https://ogp.me/ns#\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003eExample\u003c/title\u003e\n  \u003cmeta property=\"og:image\" content=\"https://flayyer.host/v2/tenant/deck/template.jpeg?title=Example\" /\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ch1\u003eExample\u003c/h1\u003e\n  ...\n  \u003cscript async defer src=\"https://unpkg.com/@flayyer/ping-script/dist/ping.min.js\"\u003e\u003c/script\u003e\n  \u003cnoscript\u003e\n    \u003cimg src=\"https://edge.flayyer.com/v2/ping.gif\" alt=\"\"/\u003e\n  \u003c/noscript\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nBy using this script we are able to pre-render the image at `https://flayyer.host/v2/tenant/deck/template.jpeg?title=Example` and also keep track of outside visitors that may be interested in your link thanks to the preview we generated.\n\n## Packages\n\nCheckout the [/packages](./packages) directory, anyways here is the full list:\n\n| Package              | Github                                          | NPM                                                                    | Description                                                                            |\n|----------------------|-------------------------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------|\n| @flayyer/ping        | [/packages/ping](./packages/ping)               | [@flayyer/ping](https://npmjs.com/package/@flayyer/ping)               | Base script logic. Every other package imports this.                                   |\n| @flayyer/ping-script | [/packages/ping-script](./packages/ping-script) | [@flayyer/ping-script](https://npmjs.com/package/@flayyer/ping-script) | Minified script for browsers (`\u003cscript src=... /\u003e`)                                    |\n| @flayyer/ping-module | [/packages/ping-module](./packages/ping-module) | [@flayyer/ping-module](https://npmjs.com/package/@flayyer/ping-module) | CommonJS-like package so you can import it on project with Webpack, Rollup or similar. |\n| @flayyer/ping-react  | [/packages/ping-react](./packages/ping-react)   | [@flayyer/ping-react](https://npmjs.com/package/@flayyer/ping-react)   | React hook and component for React.js projects.                                        |\n\n## Flayyer URLs\n\nThe easiest way of generating Flayyer URLs and forget about dealing with encoding issues is by using [flayyer/flayyer-js](https://github.com/flayyer/flayyer-js).\n\n```js\nimport Flayyer from \"@flayyer/flayyer\";\n\nconst flayyer = new Flayyer({\n  tenant: \"tenant\",\n  deck: \"deck\",\n  template: \"template\",\n  variables: {\n    title: \"Hello world!\",\n  },\n});\n\n// Use this image in your \u003chead/\u003e tags\nconst url = flayyer.href();\n// \u003e https://flayyer.host/v2/tenant/deck/template.jpeg?__v=1596906866\u0026title=Hello+world%21\n\n// Later in your HTML code:\n\u003cmeta property=\"og:image\" content={url} /\u003e\n```\n\n## Development\n\nPrepare Lerna environment with:\n\n```sh\nyarn install\nyarn run bootstrap\nyarn run build\n```\n\nTo deploy a new version:\n\n```sh\nyarn run deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuseflyyer%2Fflyyer-ping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuseflyyer%2Fflyyer-ping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuseflyyer%2Fflyyer-ping/lists"}