{"id":14963999,"url":"https://github.com/azerion/phaser-ads","last_synced_at":"2025-08-21T03:15:17.543Z","repository":{"id":8507722,"uuid":"58442319","full_name":"azerion/phaser-ads","owner":"azerion","description":"A Phaser plugin for providing nice ads integration in your phaser.io game","archived":false,"fork":false,"pushed_at":"2022-12-06T14:34:09.000Z","size":3640,"stargazers_count":87,"open_issues_count":7,"forks_count":25,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-30T17:37:16.685Z","etag":null,"topics":["cocoon","cordova","gamedistribution","heyzap","ima-sdk","phaser","phaser-ads","phaser-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/azerion.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-10T08:16:17.000Z","updated_at":"2025-07-30T06:50:50.000Z","dependencies_parsed_at":"2023-01-13T14:50:29.871Z","dependency_job_id":null,"html_url":"https://github.com/azerion/phaser-ads","commit_stats":null,"previous_names":["orange-games/phaser-ads"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/azerion/phaser-ads","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerion%2Fphaser-ads","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerion%2Fphaser-ads/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerion%2Fphaser-ads/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerion%2Fphaser-ads/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azerion","download_url":"https://codeload.github.com/azerion/phaser-ads/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azerion%2Fphaser-ads/sbom","scorecard":{"id":221115,"data":{"date":"2025-08-11","repo":{"name":"github.com/azerion/phaser-ads","commit":"b49d7373c8e22af8ccde71059bb9f7cd7a5660e6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"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":"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":"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 5/14 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":"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":"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":"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":"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":"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.2.7 not signed: https://api.github.com/repos/azerion/phaser-ads/releases/12285351","Warn: release artifact v2.2.7 does not have provenance: https://api.github.com/repos/azerion/phaser-ads/releases/12285351"],"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 22 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":"48 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-957j-59c2-j692","Warn: Project is vulnerable to: GHSA-m5pj-vjjf-4m3h","Warn: Project is vulnerable to: GHSA-j383-35pm-c5h4","Warn: Project is vulnerable to: GHSA-rm36-94g8-835r","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","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-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"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-17T02:30:42.929Z","repository_id":8507722,"created_at":"2025-08-17T02:30:42.929Z","updated_at":"2025-08-17T02:30:42.929Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271420153,"owners_count":24756490,"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-08-21T02:00:08.990Z","response_time":74,"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":["cocoon","cordova","gamedistribution","heyzap","ima-sdk","phaser","phaser-ads","phaser-plugin"],"created_at":"2024-09-24T13:32:26.964Z","updated_at":"2025-08-21T03:15:17.488Z","avatar_url":"https://github.com/azerion.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### **_IMPORTANT NOTE_**\n**This repository is to be considered _DEPRECATED_ and all efforts are going towards developing the next version of the Ad Wrapper in [azerion/h5-ad-wrapper](https://github.com/azerion/h5-ad-wrapper).**\n\n[![npm version](https://badge.fury.io/js/%40azerion%2Fphaser-ads.svg)](https://badge.fury.io/js/%40azerion%2Fphaser-ads) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/@azerion/phaser-ads/badge)](https://www.jsdelivr.com/package/npm/@azerion/phaser-ads)\n\nPhaser Ads\n==========\nThis Phaser plugin that allows you to leverage different ad providers whilst providing the same simple API.\nAlso allows you to easily integrate mobile ads (via [Cocoon](https://cocoon.io)).\n\nKey features:\n - Ads for your mobile web experience\n - Pluggable ad providers\n  - Gamedistribution.com\n  - IMA3 SDK\n  - Cocoon.io (support for AdMob/HeyZap/MoPub/Chartboost)\n  - HeyZap for Cordova\n - Integrates nicely into Phaser\n - Fullscreen ad support\n\nGetting Started\n---------------\nFirst you want to get a fresh copy of the plugin. You can get it from [this repo](https://github.com/azerion/phaser-ads/releases) or from [npm](https://www.npmjs.com/package/@azerion/phaser-ads).\n```\nnpm install @azerion/phaser-ads\n```\n\nNext up you'd want to add it to your list of js sources you load into your game:\n```html\n\u003cscript src=\"path/to/phaser-ads.min.js\"\u003e\u003c/script\u003e\n```\n\nYou could also opt for using the (free) jsdelivr cdn: \n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@azerion/phaser-ads@latest/build/phaser-ads.min.js\"\u003e\u003c/script\u003e\n```\n\nAfter adding the script to the page you can activate it by enabling the plugin:\n```javascript\ngame.add.plugin(PhaserAds.AdManager);\n```\n\nUsage\n-----\nFirst thing you need to do after loading the plugin is attaching a provider to the adManager. PhaserAds comes pre-compiled with 4 providers for you to choose from:\n - [Gamedistribution.com](https://gamedistribution.com)\n - [IMA SDK](https://developers.google.com/interactive-media-ads/docs/sdks/html5)\n - [Cocoon.io](https://cocoon.io)\n - Cordova HeyZap (wrapping your game with Cordova? Want HeyZap ads? Then this is your provider)\n\n### Gamedistribution.com\nIf you already have an account on Gamedistribution.com you can skip this introduction if not, head on over to [gamedistribution.com](https://gamedistribution.com) and sign up for a free account.\nOnce you're signed up you can check out [this guide](https://gamedistribution.com/sdk) for settings up a game. This is important because this will supply you with a gameId, which you need to supply to the plugin.\n\nSo when you have your gameId you can start by registering the provider to the plugin:\n```javascript\n// Let's create a new provider, first argument should be the game, second should be the ad tag URL\nvar provider = new PhaserAds.AdProvider.GameDistributionAds(\n   game,                                        // Your Phaser game instance\n   '2d77cfd4b1e5487d998465c29de195b3'           // Your gameId\n);\ngame.ads.setAdProvider(provider);\n```\n\nAfter this it's as easy as calling:\n```javascript\ngame.ads.showAd();\n```\n\n\n### IMA SDK\nA provider can use any number of arguments configured in order to make it work, it all depends on the implementation that was made by the developer. For our IMA Provider you can create one like this:\n```javascript\n// Let's create a new provider, first argument should be the game, second should be the ad tag URL\nvar provider = new PhaserAds.AdProvider.Ima3(\n   game,\n   'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480\u0026iu=/124319096/external/single_ad_samples\u0026ciu_szs=300x250\u0026impl=s\u0026gdfp_req=1\u0026env=vp\u0026output=vast\u0026unviewed_position_start=1\u0026correlator'\n);\ngame.ads.setAdProvider(provider);\n```\n\nNow all you need to do is request an ad, and add an event listener that is called when the ad is completed/skipped/finished/done playing.\n```javascript\ngame.ads.onContentResumed.addOnce(function() {\n    // This gets called when the ad is complete\n    game.state.start('NextState');\n});\n\n// Here we request the ad\ngame.ads.showAd();\n```\nYou can also send custom parameters by adding them as an object to the showAd function.\n\nF.A.Q.\n------\n### I Don't see any ads!\nThis can happen, sometimes the provider does something wrong, but most of the time (and when you are testing locally) your ads get blocked from showing.\nThat's right, ads don't show when testing locally. The easiest way to avoid this is by testing your game on a server (online).\n\nAnother work around would be to adjust your [/etc/hosts](https://howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file).\n\n\n### Why don't you support this ad provider!\nThe setup allows for a multitude of ad providers to work, but sadly we don't have the time and resources to add all of them.\nThat beeing said, this plugin is on GitHub, and you're welcome to shoot in a [PR](https://github.com/azerion/phaser-ads/compare) to add a new provider =)\n\nDisclaimer\n----------\nWe at Azerion just love playing and creating awesome games. We aren't affiliated with Phaser.io. We just needed some awesome ads in our awesome HTML5 games. Feel free to use it for enhancing your own awesome games!\n\nPhaser Ads is distributed under the MIT license. All 3rd party libraries and components are distributed under their\nrespective license terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazerion%2Fphaser-ads","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazerion%2Fphaser-ads","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazerion%2Fphaser-ads/lists"}