{"_id":"@agrezo/google-adsense","_rev":"1-3106b5c4c9634098bdd0bb5749a050ce","name":"@agrezo/google-adsense","dist-tags":{"latest":"1.3.2"},"versions":{"1.3.2":{"name":"@agrezo/google-adsense","version":"1.3.2","description":"Google Adsense Module for Nuxt.js","license":"MIT","repository":{"type":"git","url":"https://github.com/agrezo/google-adsense-module"},"main":"lib/module.js","publishConfig":{"access":"public"},"scripts":{"lint":"eslint lib","test":"yarn lint","release":"standard-version && git push --follow-tags && yarn publish"},"eslintIgnore":["*.template.*"],"dependencies":{},"devDependencies":{"codecov":"^3.8.1","eslint":"^7.21.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.5","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.3.1","eslint-plugin-standard":"^4.1.0","eslint-plugin-vue":"^7.7.0","jest":"^26.6.3","jsdom":"^16.4.0","nuxt":"^2.15.2","standard-version":"^9.1.1"},"keywords":["AdSense","Google","Nuxt","NuxtJS","Nuxt.js","PWA","SSR","Vue","VueJS","Vue2","VueRouter","vue-router","Web"],"licenseText":"MIT License\n\nCopyright (c) 2017 - Troy Morehouse - Nuxt Community\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@agrezo/google-adsense@1.3.2","dist":{"shasum":"0260ed2f3ca14b2285758878e53292cc1fb5e825","integrity":"sha512-xMQtTgk5DJvMPJ+Vn7RYsSHP81r+xsNQjUFxDQsUqn1/BUcBMUKWcbKkS2DlnL+BAZK02yb21uqVH/Si984+VQ==","tarball":"https://registry.npmjs.org/@agrezo/google-adsense/-/google-adsense-1.3.2.tgz","fileCount":8,"unpackedSize":18767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyHB/CRA9TVsSAnZWagAAEBIP/199Ls5RiM5v9RKtLz0s\nrK30vpLJxnDe7n8/16731dBBAl+UCao4mTAwAj/zgy2aZAMz49sQBQUbi6P7\nG5/Sgni8DXNVWtKI/P6qJ4oy+e2wKhijVqOfY9rZgWCBo9I+28lgMXLBgeF9\nqiAgAGCE/xVFuSaeF467j79juvk4g0HsAE49GfCJIuf668i1TWdmKXwUdCOg\nGFxCUkazV1bR7RqjqCLebOoGxib7VZkCE6OoVLSbr1eyt7lcTeNGkZPbdgd6\nMBLNBPZCwFqLI/wP9HzBx+Auj/4uq765+NUAGljo/js/2rryMyt+4liYw814\n8y4S2zA3KJDup8hIy7d+ej0305X/64rmEGsp6p90TxyyvomsVKCVINGubMBB\nPrRnDpV6binlC5qhEAfwle1t4QlA4WjYTiVWljshajF5dgW/ntIg7+1QpJPo\n8IyHfLdjcwA1hvNa3zkfQk37v0fMaj95b6QWCyPXUCvm4YmJyC7bPI5eYPXx\nnf+roM4Bj38iGKZ+WpTmQcD/7rclwjATv00gR7PtRmfsMEP8zUzOT+J/zXdj\naIXW5PWP/u8XZ626Bqpg6X0Q3sfucgnZzb5BPOuoEVEBulvl9HSL7UltY6C6\nX56a4Gr4MFDjA6exxUWSB3YeZu/l7wKnUDZZ/HVLCUvcewtI3Kx3+qZGlouU\n1Mc5\r\n=/M5g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzKe0g6RpdfBwav81d7dEffw7vti0vdbZ+7CkUbsVFiQIhAPywX0Fv4YaRAfsjbuNGn6pROMZywG0zRKPvvU66D3J7"}]},"_npmUser":{"name":"agrezo","email":"blichjoker@gmail.com"},"directories":{},"maintainers":[{"name":"agrezo","email":"blichjoker@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/google-adsense_1.3.2_1623748735787_0.7652282826491426"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-15T09:18:55.744Z","1.3.2":"2021-06-15T09:18:55.954Z","modified":"2022-04-04T12:03:09.689Z"},"maintainers":[{"name":"agrezo","email":"blichjoker@gmail.com"}],"description":"Google Adsense Module for Nuxt.js","keywords":["AdSense","Google","Nuxt","NuxtJS","Nuxt.js","PWA","SSR","Vue","VueJS","Vue2","VueRouter","vue-router","Web"],"repository":{"type":"git","url":"https://github.com/agrezo/google-adsense-module"},"license":"MIT","readme":"# Google AdSense\n> Google AdSense integration for Nuxt.js. Advertisements will update whenever the page route changes\n\n## Setup\n- Add `@nuxtjs/google-adsense` dependency using yarn or npm to your project\n- Add `@nuxtjs/google-adsense` to `modules` section of `nuxt.config.js`\n\n```js\n{\n  modules: [\n    // Simple usage\n    ['@nuxtjs/google-adsense', {\n      id: 'ca-pub-###########'\n    }]\n ]\n}\n```\n\nUsing top level options:\n\n```js\n{\n  modules: [\n    ['@nuxtjs/google-adsense']\n  ],\n\n 'google-adsense': {\n    id: 'ca-pub-#########'\n  }\n}\n```\n\nThe asynchronous ad code (`//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js`) is automatically\nadded to the `<head>` section of your pages.\n\n\n## Configuration options\n\n| Option | type |  description\n| -------- | ---- | -----------\n| `id` | String | Your Google Adsense Publisher client ID (i.e. `ca-pub-#########`). **Required** when not in test mode.\n| `pageLevelAds` | Boolean | Enable Adsense Page Level Ads. Default is `false`. Refer to the AdSense docs for details.\n| `tag` | String | AdSense component tag name. Defaults to `adsbygoogle`.\n| `includeQuery` | Boolean | When `false`, only `$route.path` is checked for changes. If set to `true` `$route.query` will also be taken into account. The default is `false`.\n| `analyticsUacct` | String | Google Analytics Account ID (if linking analytics with AdSense, i.e. `UA-#######-#`).\n| `analyticsDomainName` | String | Google Analytics Account Domain (if linking analytics with AdSense, i.e. `example.com`).\n| `overlayBottom` | Boolean | Enable Adsense Anchor Ads to show at bottom. Default is `false`. Refer to the AdSense docs for details.\n| `onPageLoad` | Boolean | Loads Adsense script after page loade. Default is `false`.\n| `test` | Boolean | Force AdSense into _test_ mode (see below).\n\n### Test mode\n\nThe AdSense module will automatically switch to `test` mode when runniung Nuxt in `dev` mode.\nBut you can keep test mode on in production by setting the configuration option `test` to `true`.\n\nTest mode uses a test publisher ID, so that you will not be violating AdSense TOS.\n\nNote that test advertisements will typically appear as an empty space, but will have the\ncorrect dimensions (i.e. will occupy the correct space needed by the rendered ad).\n\n## Usage\n\nInsert the `<adsbygoogle />` component (or custom component name specified in options)\nwherever you would like an advertisment placed.\n\nThe ad defaults to `auto` size format (configurable by setting the prop `ad-format`). This mode\nis responsive by nature. You should place the `<adsbygoogle />` component inside a container element\nthat has a specified (min/max) width and (min/max) height (which can be based on media queries),\nor use style or classes on the `<adsbygoogle />` component to restrict the advertisement to a\nspecific size (or sizes).\n\nUse the `ad-slot` property to specify your google adsense ad slot value (specified as a string)\n\n**Component props:**\n\n| prop | type | description\n| ---- | ---- | -----------\n| `ad-slot` | String | Google Adsense adslot. **This prop is required when not in test mode**. Refer to your AdSense account for ad-slot values.\n| `ad-format` | String | Defaults to `'auto'`. Refer to the adsense docs for other options\n| `ad-style` | Object | Styles to apply to the rendered `<ins>` element. Default: `{ display: 'block' }`. Refer to VueJS [style binding docs](https://vuejs.org/v2/guide/class-and-style.html#Object-Syntax-1) for the Object format.\n| `ad-layout` | String | Optional. Refer to the adsense docs\n| `ad-layout-key` | String | Optional. Refer to the adsense docs\n| `page-url` | String | Optional.  Set a reference page URL (of similar content) if the ad is on a page that requires authentication. When set, this prop must be a fully qualified URL (inclcuding protocol and hostname).\n| `include-query` | Boolean | Override global option `includeQuery` on a per ad basis. Ensure all ads on a page have the same setting.\n| `analytics-uacct` | String | Google Analytics Account ID (if linking analytics with AdSense, i.e. `UA-#######-#`). Defaults to the value specified in the plugin option `analyticsUacct`.\n| `analytics-domain-name` | String | Google Analytics Account domain (if linking analytics with AdSense, i.e. `example.com`). Defaults to the value specified in the plugin option `analyticsDomainName`.\n\n\n## Automatic updating of Ads\nWhenever your route changes, any disaplayed ads will update, just as they would on normal\npage loads.\n\n\n## Caveats:\n- **Note:** AdSense limits you to a maximum of three (3) ads per page.\n- **Caution:** Reloading of ads arbitrarily (with minimal page content changes) may result in\nthe suspension of your AdSense account. _Refer to AdSense for full terms of use._\n- Google needs to crawl each page where ads appear. Ensure your site SSR renders any page where\nads apepar. Ads on un-crawlable pages will not be shown.\n- When placing ads on pages that require authentication, set `page-url` on the `<adsbygoogle />` component to the URL of a page on your site that is publicly accessible, which would have similar/relevant content.\n\n\n## Background\nThis module uses a technique developed by the Angular team (with help from Google Adsense)\nto handle updating ads on progressive web applications:\n- https://github.com/leonardteo/google-ads-test-angularjs\n- https://groups.google.com/forum/#!topic/angular/eyVo4XU04uk\n\nEach time a new advertisement is requested, the adsense parameter `data-ad-region` is\nupdated to a random value. For this reason, you cannot set the `data-ad-region` attribute\non the `<adsbygoogle />` component.\n\nFor test mode, the following blog was used as a reference:\n- https://www.thedev.blog/3087/test-adsense-ads-safely-without-violating-adsense-tos/\n\n\n## License\n\n[MIT License](./LICENSE)\n\nCopyright (c) 2017 Troy Morehouse - Nuxt Community\n","readmeFilename":"README.md"}