{"id":25835806,"url":"https://github.com/shukerullah/react-native-google-publisher-tag","last_synced_at":"2025-03-01T01:34:38.492Z","repository":{"id":57337329,"uuid":"287069220","full_name":"shukerullah/react-native-google-publisher-tag","owner":"shukerullah","description":"A react-native component for Google Publisher Tags using WebView","archived":false,"fork":false,"pushed_at":"2020-08-31T12:07:25.000Z","size":12,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-19T18:18:47.976Z","etag":null,"topics":["doubleclick-banner","doubleclick-for-publishers","google-ads","react-native"],"latest_commit_sha":null,"homepage":"","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/shukerullah.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":"2020-08-12T17:01:07.000Z","updated_at":"2021-06-13T20:19:44.000Z","dependencies_parsed_at":"2022-09-10T03:53:37.586Z","dependency_job_id":null,"html_url":"https://github.com/shukerullah/react-native-google-publisher-tag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukerullah%2Freact-native-google-publisher-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukerullah%2Freact-native-google-publisher-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukerullah%2Freact-native-google-publisher-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shukerullah%2Freact-native-google-publisher-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shukerullah","download_url":"https://codeload.github.com/shukerullah/react-native-google-publisher-tag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241304308,"owners_count":19941100,"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":["doubleclick-banner","doubleclick-for-publishers","google-ads","react-native"],"created_at":"2025-03-01T01:34:37.857Z","updated_at":"2025-03-01T01:34:38.477Z","avatar_url":"https://github.com/shukerullah.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/shukerullah"],"categories":[],"sub_categories":[],"readme":"# react-native-google-publisher-tag\n\n## Installtion\n\n```shell\n$ yarn add react-native-google-publisher-tag\n```\n\nor\n\n```shell\n$ npm install --save react-native-google-publisher-tag\n```\n\n_Note: You need to install [react-native-webview](https://github.com/react-native-community/react-native-webview)_ before using `react-native-google-publisher-tag`\n\n## Example\n\n```javascript\nimport GooglePublisherTag from 'react-native-google-publisher-tag';\n\n\u003cGooglePublisherTag\n  adUnitId=\"/6499/example/APIDemo/AdSizes\"\n  adUnitSize=\"[[320, 50]]\"\n  baseUrl=\"https://your-domain.com\"\n  adUnitTargeting={{\n    interest: 'basketball',\n  }}\n/\u003e\n\n\u003cGooglePublisherTag\n  adUnitId=\"/6499/example/APIDemo/AdSizes\"\n  adUnitSize=\"[[300, 250]]\"\n  baseUrl=\"https://your-domain.com\"\n  adUnitTargeting={{\n    gender: 'male',\n    age: '20-30',\n  }}\n/\u003e\n\n\u003cGooglePublisherTag\n  adUnitId=\"/6499/example/APIDemo/AdSizes\"\n  adUnitSize=\"[[300, 250], [728, 90], [750, 200]]\"\n  baseUrl=\"https://your-domain.com\"\n  adUnitTargeting={{\n    gender: 'male',\n    interests: ['sports', 'music', 'movies'],\n    key: ['value1', 'value2', 'value3'],\n  }}\n  slotOnload={() =\u003e {\n    // TODO: Do something on load\n  }}\n  onPress={(url) =\u003e {\n    // Note: This will override Linking.openURL\n    // Linking.openURL(url);\n    // OR\n    // InAppBrowser.open(url)\n  }}\n/\u003e\n\n\u003cGooglePublisherTag\n  adUnitId=\"/6499/example/APIDemo/Fluid\"\n  adUnitSize=\"[['fluid']]\"\n  width={414}\n  baseUrl=\"https://your-domain.com\"\n/\u003e\n```\n\n## Props\n\n### adUnitId\n\nSets the AdUnit ID for all future ad requests.\n| TYPE | REQUIRED |\n| ------------- | ------------- |\n| string | Yes |\n\n### adUnitSize\n\nEvery ad slot you define must specify the ad size(s) eligible to serve in that slot. The way ad sizes are specified varies depending on the type of ads to be displayed, as well as the size and flexibility of the ad slots themselves. _Corresponding to [GPT Ad sizes](https://developers.google.com/doubleclick-gpt/guides/ad-sizes)_.\n| TYPE | REQUIRED |\n| ------------- | ------------- |\n| string | Yes |\n\n### adUnitTargeting\n\nAd unit targeting can be used to target ads more granularly than ad units. _Corresponding to [GPT Key-value targeting](https://developers.google.com/doubleclick-gpt/guides/key-value-targeting)_.\n| TYPE | REQUIRED |\n| ------------- | ------------- |\n| string | No |\n\n### baseUrl\n\n| TYPE   | REQUIRED |\n| ------ | -------- |\n| string | Yes      |\n\n### width\n\nWidth is not required but recommended for fluid and it effect only fluid size. By default its \"100%\".\n| TYPE | REQUIRED |\n| ------ | -------- |\n| number | No |\n\n### backgroundColor\n\n| TYPE   | REQUIRED |\n| ------ | -------- |\n| string | No       |\n\n### onPress\n\n| TYPE     | REQUIRED |\n| -------- | -------- |\n| Function | No       |\n\n### impressionViewable\n\n_Reference: [googletag.events.ImpressionViewableEvent](https://developers.google.com/doubleclick-gpt/reference#googletag.events.impressionviewableevent)_.\n| TYPE | REQUIRED |\n| -------- | -------- |\n| Function | No |\n\n### slotOnload\n\n_Reference: [googletag.events.SlotOnloadEvent](https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotonloadevent)_.\n| TYPE | REQUIRED |\n| -------- | -------- |\n| Function | No |\n\n### slotRenderEnded\n\n_Reference: [googletag.events.SlotRenderEndedEvent](https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotrenderendedevent)_.\n| TYPE | REQUIRED |\n| -------- | -------- |\n| Function | No |\n\n### slotRequested\n\n_Reference: [googletag.events.SlotRequestedEvent](https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotrequestedevent)_.\n| TYPE | REQUIRED |\n| -------- | -------- |\n| Function | No |\n\n### slotResponseReceived\n\n_Reference: [googletag.events.SlotResponseReceived](https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotresponsereceived)_.\n| TYPE | REQUIRED |\n| -------- | -------- |\n| Function | No |\n\n### slotVisibilityChanged\n\n_Reference: [googletag.events.SlotVisibilityChangedEvent](https://developers.google.com/doubleclick-gpt/reference#googletag.events.slotvisibilitychangedevent)_.\n| TYPE | REQUIRED |\n| -------- | -------- |\n| Function | No |\n\n### Follow me on Twitter: [@shukerullah](https://twitter.com/shukerullah)\n\n\u003ca href=\"https://www.buymeacoffee.com/shukerullah\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshukerullah%2Freact-native-google-publisher-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshukerullah%2Freact-native-google-publisher-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshukerullah%2Freact-native-google-publisher-tag/lists"}