{"id":16231500,"url":"https://github.com/hustcc/react-adsense","last_synced_at":"2025-04-04T09:09:56.844Z","repository":{"id":57332822,"uuid":"70398708","full_name":"hustcc/react-adsense","owner":"hustcc","description":":film_projector: a simple React-component for Google AdSense / Baidu advertisement.","archived":false,"fork":false,"pushed_at":"2023-03-27T13:51:54.000Z","size":368,"stargazers_count":274,"open_issues_count":9,"forks_count":43,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-27T04:06:34.749Z","etag":null,"topics":["adsense","advertisement","baidu-advertisement","google-adsense","react","react-component"],"latest_commit_sha":null,"homepage":"https://git.hust.cc/react-adsense","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/hustcc.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-10-09T11:29:32.000Z","updated_at":"2025-03-24T02:01:45.000Z","dependencies_parsed_at":"2024-06-18T13:37:48.897Z","dependency_job_id":"1d08abfd-dfaa-441b-adab-0320aa704a0b","html_url":"https://github.com/hustcc/react-adsense","commit_stats":{"total_commits":23,"total_committers":11,"mean_commits":2.090909090909091,"dds":0.7391304347826086,"last_synced_commit":"aa9ec15cfeb3fc05e85069be703fc763af1d7954"},"previous_names":["hustcc/react-adsence"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Freact-adsense","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Freact-adsense/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Freact-adsense/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Freact-adsense/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustcc","download_url":"https://codeload.github.com/hustcc/react-adsense/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939200,"owners_count":20857919,"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":["adsense","advertisement","baidu-advertisement","google-adsense","react","react-component"],"created_at":"2024-10-10T13:05:47.116Z","updated_at":"2025-04-04T09:09:56.820Z","avatar_url":"https://github.com/hustcc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-adsense\n\n\u003e react-adsense is a React-component for Google AdSense / Baidu advertisement.\n\n[![Build Status](https://travis-ci.org/hustcc/react-adsense.svg?branch=master)](https://travis-ci.org/hustcc/react-adsense)\n[![npm](https://img.shields.io/npm/v/react-adsense.svg)](https://www.npmjs.com/package/react-adsense)\n[![npm](https://img.shields.io/npm/dm/react-adsense.svg)](https://www.npmjs.com/package/react-adsense)\n[![npm](https://img.shields.io/npm/l/react-adsense.svg)](https://www.npmjs.com/package/react-adsense)\n[![demo](https://img.shields.io/badge/LiveDemo-ClickHere-ff69b4.svg)](http://git.hust.cc/react-adsense/)\n\n\n# 1. Install\n\n\u003e **npm install --save react-adsense**\n\nBefore use Google AdSense, you should add the `script` at the end of HTML.\n\n```html\n\u003cscript async src=\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"\u003e\u003c/script\u003e\n```\n\n\n# 2. Usage\n\n```jsx\nimport React from 'react';\nimport AdSense from 'react-adsense';\n\n// ads with no set-up\n\u003cAdSense.Google\n  client='ca-pub-7292810486004926'\n  slot='7806394673'\n/\u003e\n\n// ads with custom format\n\u003cAdSense.Google\n  client='ca-pub-7292810486004926'\n  slot='7806394673'\n  style={{ width: 500, height: 300, float: 'left' }}\n  format=''\n/\u003e\n\n// responsive and native ads\n\u003cAdSense.Google\n  client='ca-pub-7292810486004926'\n  slot='7806394673'\n  style={{ display: 'block' }}\n  layout='in-article'\n  format='fluid'\n/\u003e\n\n// auto full width responsive ads\n\u003cAdSense.Google\n  client='ca-pub-7292810486004926'\n  slot='7806394673'\n  style={{ display: 'block' }}\n  format='auto'\n  responsive='true'\n  layoutKey='-gw-1+2a-9x+5c'\n/\u003e\n```\n\n\n# 3. Props\n\n - Required props:\n   - `client`\n   - `slot`\n - Optional props:\n   - `className`:\n   - `style`:\n   - `layout`:\n   - `layoutKey`:\n   - `format`:\n   - `responsive`:\n\n\n# 4. TODO\n\n - `Baidu` advertisement supported.\n\n\n# LICENSE\n\nMIT@[hustcc](https://github.com/hustcc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Freact-adsense","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustcc%2Freact-adsense","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Freact-adsense/lists"}