Giter Site home page Giter Site logo

google-adsense's Introduction

npm version npm downloads License Nuxt


Note: This branch is for Nuxt 3 compatible module. Checkout legacy-v2 branch for Nuxt 2 support.


Google AdSense

Google AdSense integration for Nuxt.js. Advertisements will update whenever the page route changes

Setup

  • Add @nuxtjs/google-adsense dependency using yarn or npm to your project
  • Add @nuxtjs/google-adsense to modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    ['@nuxtjs/google-adsense', {
      id: 'ca-pub-###########'
    }]
 ]
}

Using top level options:

{
  modules: [
    ['@nuxtjs/google-adsense']
  ],

 googleAdsense: {
    id: 'ca-pub-#########'
  }
}

Using runtime config:

{
  modules: [
    ['@nuxtjs/google-adsense']
  ],

  googleAdsense: {
    onPageLoad: false,
    pageLevelAds: false,
  },

  publicRuntimeConfig: {
    googleAdsense: {
      id: process.env.GOOGLE_ADSENSE_ID,
      test: process.env.GOOGLE_ADSENSE_TEST_MODE === 'true',
    },
  },
}

The asynchronous ad code (//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js) is automatically added to the <head> section of your pages.

Configuration options

Option type description
id String Your Google AdSense Publisher client ID (i.e. ca-pub-#########). Required when not in test mode.
adFormat String Sets a global default ad format. Can be overridden with component props.
analyticsDomainName String Google Analytics Account Domain (if linking analytics with AdSense, i.e. example.com).
analyticsUacct String Google Analytics Account ID (if linking analytics with AdSense, i.e. UA-#######-#).
hideFilled Boolean When false, unfilled ads will not be hidden, when true unfilled ads will be hidden. The default is false.
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.
onPageLoad Boolean Loads Adsense script after page load. Default is false.
overlayBottom Boolean Enable Adsense Anchor Ads to show at bottom. Default is false. Refer to the AdSense docs for details.
pageLevelAds Boolean Enable AdSense Page Level Ads. Default is false. Refer to the AdSense docs for details.
pauseOnLoad Boolean Pauses ad requests to obtain user consent to use cookies or other local storage in accordance with the GDPR. Refer to the AdSense docs for details. false.
tag String AdSense component tag name. Defaults to adsbygoogle.
test Boolean Force AdSense into test mode (see below).

Test mode

The AdSense module will automatically switch to test mode when running Nuxt in dev mode. But you can keep test mode on in production by setting the configuration option test to true.

Test mode uses a test publisher ID, so that you will not be violating AdSense TOS.

Note that test advertisements will typically appear as an empty space, but will have the correct dimensions (i.e. will occupy the correct space needed by the rendered ad).

Usage

Insert the <Adsbygoogle /> component wherever you would like an advertisement placed.

You should place the <Adsbygoogle /> component inside a container element that has a specified (min/max) width and (min/max) height (which can be based on media queries), or use style or classes on the <Adsbygoogle /> component to restrict the advertisement to a specific size (or sizes).

Use the ad-slot property to specify your Google AdSense ad slot value (specified as a string).

Please refer to the adsense documentation for more info. Google Adsense Documentation

Component props:

prop type description
ad-slot String Google Adsense adslot. This prop is required when not in test mode. Refer to your AdSense account for ad-slot values.
ad-format String Optional. Refer to the AdSense docs for other options
ad-style Object Styles to apply to the rendered <ins> element. Default: { display: 'block' }. Refer to VueJS style binding docs for the Object format.
ad-layout String Optional. Refer to the AdSense docs
ad-layout-key String Optional. Refer to the AdSense docs
hide-unfilled Boolean Optional. Hides unfilled ads if true.
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 (including protocol and hostname).
include-query Boolean Override global option includeQuery on a per ad basis. Ensure all ads on a page have the same setting.
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.
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.

Component exposed internal data | name | type | description | ____ | ____ | ___________ |showAd | method | Trigger the show ad method to show the ad. | updateAd | method | Trigger the update ad method to refresh the ad. | isUnfilled | computed ref | Tracks unfilled attribute on ad element. Returns true if data-ad-state = 'unfilled'.

Automatic updating of Ads

Whenever your route changes or optionally if your route query parameters change, any displayed ads will update, just as they would on normal page loads.

Caveats:

  • Caution: Reloading of ads arbitrarily (with minimal page content changes) may result in the suspension of your AdSense account. Refer to AdSense for full terms of use.
  • Google needs to crawl each page where ads appear. Ensure your site SSR renders any page where ads appear. Ads on un-crawlable pages will not be shown.
  • 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.

Background

This module uses a technique developed by the Angular team (with help from Google AdSense) to handle updating ads on progressive web applications:

Each time a new advertisement is requested, the AdSense parameter data-ad-region is updated to a random value. For this reason, you cannot set the data-ad-region attribute on the <Adsbygoogle /> component.

License

MIT License

google-adsense's People

Contributors

1hakr avatar 3dd13 avatar bennettfrazier avatar danielroe avatar dargmuesli avatar dependabot[bot] avatar eternal-rise avatar farnabaz avatar javray avatar khoazero123 avatar kylegl avatar mannil avatar matwaligora avatar mirumirumi avatar myagizguler avatar renovate[bot] avatar rexarvind avatar seosmmbusiness avatar tmorehouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-adsense's Issues

Ads sometimes doesn't show

I place many ads in nuxt application. In some places it doesn't show. Sometime it shows on desktop view but not on mobile view.

Exclude pages

Hello,

Would it be possible to be able to exclude pages for automatic ads?

For example, on a login page, there is not enough content and Google Adsense calls me to order for non-compliance with the rules, because the page does not have enough content.

Thank you

getPageCorrelator undefined in console

The module and everything works, but I am seeing this log in my console, both on development and production, sometimes the undefined is replaced by a number.

getPageCorrelator undefined     show_ads_impl.js:15 

Does anyone know what that means?

This question is available on Nuxt community (#c22)

Would love a working example.

Would love a working example as reference.

Been trying to get mine code working but it doesn't seem to work show anything in page.
It shows up the tag of

tag of <adsbygoogle/>

Console error:

[Vue warn]: Unknown custom element: <adsbygoogle> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

but nothing to show for it.

Thanks!

This question is available on Nuxt.js community (#c3)

Error: Cannot find module './package.json'

To recreate this I did:

  • vue init nuxt-community/starter-template vue-adsense-test
  • cd vue-adsense-test
  • npm i
  • npm i -S @nuxtjs/google-adsense
  • added adsense module to nuxt.config.js

After installing 1.0.1 and adding this to my nuxt.config.js

    ['@nuxtjs/google-adsense', { id: '<my id>' }],    

This is logged to the terminal while nuxt is starting up


> [email protected] dev /home/evan/devel/temp/vue-adsense-test
> nuxt

{ Error: Cannot find module './package.json'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/evan/devel/temp/vue-adsense-test/node_modules/@nuxtjs/google-adsense/lib/module.js:61:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at ModuleContainer._callee2$ (/home/evan/devel/temp/vue-adsense-test/node_modules/nuxt/lib/core/module.js:108:16)
    at tryCatch (/home/evan/devel/temp/vue-adsense-test/node_modules/nuxt/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/home/evan/devel/temp/vue-adsense-test/node_modules/nuxt/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/home/evan/devel/temp/vue-adsense-test/node_modules/nuxt/node_modules/regenerator-runtime/runtime.js:117:21) code: 'MODULE_NOT_FOUND' }
  nuxt:build App root: /home/evan/devel/temp/vue-adsense-test +0ms

I get this in the browser: Cannot GET / and this in the browser console (Chrome):

Failed to load resource: the server responded with a status of 404 (Not Found)
This question is available on Nuxt.js community (#c7)

not detected by Google Adsense application

I've enabled this module in a production website that's hosted using a static nuxt deployment. I tried applying to Google Adsense twice and both times the application failed because they were unable to detect the code on the website. I can look at the sources and see the code in an included <script> tag, but Google doesn't detect it.

This question is available on Nuxt.js community (#c4)

module causes jump in page views metric.

I recently rebuilt a website using nuxt and when it went live with this module, adsense page views metric was multiplied almost 4 times compared to the previous non-nuxt version.
revenue, impressions, clicks and cpc haven't changed in any drastic way, but i fear this change in page views could lead to problems with my account.
I have the component setup normally inside another component that renders it if current $route.path is not in a blacklistedUrls array.
Any help would be greatly appreciated as I've been trying to solve this problem for days to no avail.

No ads are rendering after generate SSR

Added this plugin and configured it with the correct details. Test mode is working perfectly but once I generate the application it renders component as it is and even the pagead script is not there in the head section

Uncaught P error

Hi,

I try to add addsense module in my app https://shirime.one and I get this error :

"adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page."

my nuxt config :

'google-adsense': {
  id: 'ca-pub-6212158440227897',
  pageLevelAds: true,
},

page-url on protected pages doesn't work

When placing ads on pages that require authentication, set page-url on the component to the URL of a page on your site that is publicly accessible, which would have similar/relevant content.

Just did it and now the ads are not visible anymore on all pages.

Can you please provide example or way to fix this? Thanks

Active

Is this module still active?

This question is available on Nuxt community (#c14)

Google adsense working abnormally

@tmorehouse
I am using
Nuxt version - latest
npm - latest
node - latest
the adsense module by nuxt works normally as it would in development mode. But in production mode the ads are being shown on each page.

This question is available on Nuxt community (#c17)

Getting 400 - "Failed to load resource", When not in test mode

Anyone know of issues when testing in localhost with real google account ID and not in test mode?

I'm getting a "Failed to load resource 400" error. However it works fine if I remove the "ad-slot" prop. But of course, without that ad slot prop and under test mode, I'm only getting test ads with that module's test account ID.

Ads showing only on page reload

I have inserted an ad to the my page using this module and this ad works only with full page reload (for example when reload the page in browser or paste direct link on address field). When I open this page from my application (by clicking nuxt-link or after $route.push) ad wasn't load.
my nuxt-config looks like:

modules: [
    ['@nuxtjs/google-adsense']
  ],
  'google-adsense': {
    id: 'ca-pub-xxxxxx',
    test: false,
    //onPageLoad: true //I've also try to set this property true but it doesn't help
  },

and in my *.vue file:

  <div class="my-ad-banner">
            <adsbygoogle
              :ad-style="{display: 'block!important', width: '208px'}"
              ad-client="ca-pub-xxxx"
              ad-slot="1231312312"
              ad-format="auto"
              full-width-responsive
            ></adsbygoogle>
          </div>
.my-ad-banner {
    min-width: 208px;
    margin-bottom: 16px;
  }

This issue as been imported as [question](https://cmty.app/nuxt/google-adsense-module/issues/c15) since it does not respect [google-adsense-module issue template](https://cmty.app/nuxt/issues/new?repo=google-adsense-module). Only bug reports and feature requests stays open to reduce maintainers workload.

This issue as been imported as question since it does not respect google-adsense-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/google-adsense-module/issues/c15.

Originally posted by @CMTY in #24 (comment)

This question is available on Nuxt community (#c16)

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

This question is available on Nuxt.js community (#c2)

Can't set the ins class

I'm trying to use media query based classes, for example:

.example_responsive_1 {
  width: auto;
  height: 100px;
  max-height: 100px;
}
@media (min-width: 568px) {
  .example_responsive_1 {
    width: auto;
    height: 60px;
    max-height: 60px;
  }
}
@media (min-width: 800px) {
  .example_responsive_1 {
    width: auto;
    height: 90px;
    max-height: 90px;
  }

to control the size of the Google Ad. However, I can't find a way to make this work just using ad-style. Any suggestions?

This question is available on Nuxt community (#c21)

Automatic advertisement cause page error

After the Adsense automatic advertisement is turned on, sometimes the page will get an error.

I found that if the ad is displayed immediately before nuxt components load, there is a high probability that an error will be reported.

image


If the ad is displayed after the nuxt component is loaded, no error will be reported.

image


error:

Failed to execute 'appendChild' on 'Node': This node type does not support this method

Cannot show ads on SSR

Hi,
I have a SSR nuxtjs application and using this module. I got apply by adsense but cannot display ads (they are not showing).

I try without the module (using the code that give google), and it works.
But if i change page, ads are not showing, it need hot reload on each page.

nuxt generate

It seems spa version doesn't work.
adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page.

This question is available on Nuxt.js community (#c6)

FR: compatible to @nuxt/content-theme-docs

Expect

Works on the nuxt sites using @nuxt/content-theme-docs


Behavior now

When loading, i can see the ads (weird style), then when page loaded completely, ads gone...

When loading:

QQ20210325-155215@2x

Page loaded:

QQ20210325-155242@2x

Source code: https://github.com/willin/rx.js.cool

Demo: https://rx.js.cool


Extra Infos

Versions:

    "@nuxt/content-theme-docs": "0.10.1",
    "@nuxtjs/google-adsense": "^1.3.0",
    "@nuxtjs/google-analytics": "^2.4.0",
    "@nuxtjs/sitemap": "^2.4.0",
    "nuxt": "^2.15.3"

Nuxt Config:

import theme from '@nuxt/content-theme-docs';

export default theme({
  loading: { color: '#00CD81' },
  i18n: {
    locales: () => [
      {
        code: 'zh',
        iso: 'zh-CN',
        file: 'zh-CN.js',
        name: '简体中文'
      }
    ],
    defaultLocale: 'zh'
  },
  buildModules: ['@nuxtjs/google-analytics', '@nuxtjs/google-adsense', '@nuxtjs/sitemap'],
  content: {
    liveEdit: false
  },
  components: true,
  pwa: {
    manifest: {
      name: 'RxJS教程'
    }
  },
  googleAnalytics: {
    id: 'UA-33096931-4'
  },
  'google-adsense': {
    id: 'ca-pub-5059418763237956',
    pageLevelAds: true
  },
  sitemap: {
    hostname: 'https://rx.js.cool'
  }
});

#68 is back: Uncaught ReferenceError: assignment to undeclared variable adsbygoogle

Issue with nuxtJs

This plugin works well in development environment but in production nothing shows.

The value of google_ad_client not detected

I try to follow the instruction to use this package, but why on my website source code not detect the adsense id (google_ad_client), please can anyone explain this, because adsense warn me to add the script code into html head.

Expected:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-123456789",
    enable_page_level_ads: true
});
</script>

My website result:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-google",
    enable_page_level_ads: true
});
</script>

My nuxt.config.js:

modules:[
    ...
    "@nuxtjs/google-adsense"
],

"google-adsense": {
    id: "ca-pub-1689261451013362",
    pageLevelAds: true,
    test: true
  },

i hope anyone can help and give me a solutions. thanks

This question is available on Nuxt community (#c25)

Support Auto Ads

I want to add Auto Ads to Nuxt project. But I don't see any option. Can you suggest to resolve this problem ? thank so much

Failed to load resource: the server responded with a status of 400 ()

Hi, I try to set google adsense, in my adsense account everything is ok, I waited 1 hours since I've created the ads but, I've this error in my site :
https://shirime.one (for see the error, launch the game, the ad is in the wating game popup)

The error :

Failed to load resource: the server responded with a status of 400 ()
googleads.g.doubleclick.net/pagead/ads?client=ca-google&output=html&h=250&slotname=xxxxxxxxx&adk=xxxxxxx&adf=xxx&pi=t.ma~as.9487980155&w=310&fwrn=4&fwrnh=100&lmt=1615460786&rafmt=1&psa=0&format=310x250&url=https%3A%2F%2Fshirime.one%2Ffr%2Fbegin&region=page-0.7588729586413894&flash=0&adtest=on&fwr=0&rpe=1&resp_fmts=3&wgl=1&uach=WyJtYWNPUExXzJfMyIsIng4NiIsIiIsIjg5LjAuNDM4OS44MiIsW11d&dt=xxx&bpp=4&bdt=9163&idt=5&shv=r20210309&cbv=r20xx&ptt=9&saldr=aa&abxe=1&cookie=ID%xxxx-2295b77a01a700ca%3AT%3D1615125211%3ART%3D1615125211%3AS%3DALNI_MYsY-AtyVXbrrl6V3GYrynp9cgapw&nras=1&correlator=965419383795&frm=20&pv=1&ga_vid=xxx&ga_sid=xxxxxxx&ga_hid=1674216178&ga_fc=0&u_tz=60&u_his=2&u_java=0&u_h=1080&u_w=3840&u_ah=1055&u_aw=3779&u_cd=24&u_nplug=3&u_nmime=4&adx=662&ady=209&biw=1634&bih=976&scr_x=0&scr_y=0&eid=44737537%2C31060288%2C44737564%2C21066923&oid=3&pvsid=1987554418072831&pem=495&ref=https%3A%2F%2Fshirime.one%2F&rx=0&eae=0&fc=1408&brdim=647%2C25%2C647%2C25%2C3779%2C25%2C1634%2C1055%2C1634%2C976&vis=1&rsz=%7C%7CaeE%7C&abl=CA&pfx=0&fu=8320&bc=31&ifi=2&uci=a!2&fsb=1&xpc=tqxVktV1cc&p=https%3A//shirime.one&dtd=15:1 Failed to load resource: the server responded with a status of 400 ()
ads:1 Failed to load resource: the server responded with a status of 400 ()

My nuxt config:

modules: [
    '@nuxtjs/pwa',
    'vue-social-sharing/nuxt',
    'nuxt-i18n',
    '@nuxtjs/sitemap',
    'nuxt-lazy-load',
    'cookie-universal-nuxt',
    [
      '@nuxtjs/google-adsense',
      {
        id: 'ca-pub-xxxxxxxxxxxxxxxxx', 
        test: true,
      },
    ],
  ],

Implmentation:

<template>
  <transition name="fade" mode="in-out">
    <UiModal no-quit>
      <div class="absolute m-5 top-0 right-0">
        <UiTitle :text="String(count)" level="3" />
      </div>

      <aside class="absolute inset-0 z-50 flex justify-center items-center">
        <div style="width: 310px; height: 558px">
          <adsbygoogle ad-slot="xxxxxxxxxx" />
        </div>
      </aside>
    </UiModal>
  </transition>
</template>

<script>
import { mapMutations } from 'vuex'
import { SET_COUNTER_MODAL } from '~/store/mutation-types'

export default {
  name: 'CounterModal',
  components: {
    UiModal: require('@/components/ui/UiModal.vue').default,
    UiTitle: require('@/components/ui/UiTitle.vue').default,
  },
  data: () => ({
    count: 6,
  }),
  mounted() {
    setInterval(() => {
      this.count--
    }, 1000)
  },
  methods: {
    ...mapMutations([SET_COUNTER_MODAL]),
  },
}
</script>

When using nuxt keep-alive and try to navigate back to a url that had ads i get the following error.

Error

P {message: "adsbygoogle.push() error: All ins elements in the … with class=adsbygoogle already have ads in them.", name: "TagError", pbr: true, stack: "TagError: adsbygoogle.push() error: All ins elemen…node_modules/vue/dist/vue.runtime.esm.js:1905:14)"}message: "adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them."name: "TagError"pbr: truestack: "TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them.↵    at Qm (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:232:210)↵    at Km (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:228:454)↵    at https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:224:47↵    at ff.p.ja (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:72:294)↵    at sf (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:80:179)↵    at Gm (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:224:29)↵    at Object.push (https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js:236:249)↵    at VueComponent.eval (webpack-internal:///./.nuxt/adsbygoogle.js:135:59)↵    at Array.eval (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1979:12)↵    at flushCallbacks (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1905:14)"__proto__: Error
eval @ adsbygoogle.js?7081:127
eval @ vue.runtime.esm.js?2b0e:1980
flushCallbacks @ vue.runtime.esm.js?2b0e:1906
Promise.then (async)
timerFunc @ vue.runtime.esm.js?2b0e:1933
nextTick @ vue.runtime.esm.js?2b0e:1990
queueWatcher @ vue.runtime.esm.js?2b0e:4402
update @ vue.runtime.esm.js?2b0e:4544
notify @ vue.runtime.esm.js?2b0e:730
reactiveSetter @ vue.runtime.esm.js?2b0e:1055
proxySetter @ vue.runtime.esm.js?2b0e:4631
showAd @ adsbygoogle.js?7081:121
eval @ vue.runtime.esm.js?2b0e:1980
flushCallbacks @ vue.runtime.esm.js?2b0e:1906
Promise.then (async)
timerFunc @ vue.runtime.esm.js?2b0e:1933
nextTick @ vue.runtime.esm.js?2b0e:1990
Vue.$nextTick @ vue.runtime.esm.js?2b0e:3521
updateAd @ adsbygoogle.js?7081:118
$route @ adsbygoogle.js?7081:103
run @ vue.runtime.esm.js?2b0e:4568
flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310
eval @ vue.runtime.esm.js?2b0e:1980
flushCallbacks @ vue.runtime.esm.js?2b0e:1906
Promise.then (async)
timerFunc @ vue.runtime.esm.js?2b0e:1933
nextTick @ vue.runtime.esm.js?2b0e:1990
queueWatcher @ vue.runtime.esm.js?2b0e:4402
update @ vue.runtime.esm.js?2b0e:4544
notify @ vue.runtime.esm.js?2b0e:730
reactiveSetter @ vue.runtime.esm.js?2b0e:1055
eval @ vue-router.esm.js?8c4f:2989
eval @ vue-router.esm.js?8c4f:2988
updateRoute @ vue-router.esm.js?8c4f:2409
eval @ vue-router.esm.js?8c4f:2263
eval @ vue-router.esm.js?8c4f:2397
step @ vue-router.esm.js?8c4f:2001
step @ vue-router.esm.js?8c4f:2008
runQueue @ vue-router.esm.js?8c4f:2012
eval @ vue-router.esm.js?8c4f:2392
step @ vue-router.esm.js?8c4f:2001
eval @ vue-router.esm.js?8c4f:2005
eval @ vue-router.esm.js?8c4f:2379
eval @ vue-router.esm.js?8c4f:2162
iterator @ vue-router.esm.js?8c4f:2357
step @ vue-router.esm.js?8c4f:2004
step @ vue-router.esm.js?8c4f:2008
eval @ vue-router.esm.js?8c4f:2005
eval @ vue-router.esm.js?8c4f:2379
_callee6$ @ client.js?06a0:487
tryCatch @ runtime.js?96cf:63
invoke @ runtime.js?96cf:293
eval @ runtime.js?96cf:118
asyncGeneratorStep @ asyncToGenerator.js?1da1:3
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
eval @ asyncToGenerator.js?1da1:32
eval @ asyncToGenerator.js?1da1:21
render @ client.js?06a0:263
iterator @ vue-router.esm.js?8c4f:2357
step @ vue-router.esm.js?8c4f:2004
eval @ vue-router.esm.js?8c4f:2005
eval @ vue-router.esm.js?8c4f:2379
_callee4$ @ client.js?06a0:184
tryCatch @ runtime.js?96cf:63
invoke @ runtime.js?96cf:293
eval @ runtime.js?96cf:118
asyncGeneratorStep @ asyncToGenerator.js?1da1:3
_next @ asyncToGenerator.js?1da1:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js?1da1:13
_next @ asyncToGenerator.js?1da1:25
eval @ asyncToGenerator.js?1da1:32
eval @ asyncToGenerator.js?1da1:21
loadAsyncComponents @ client.js?06a0:147
iterator @ vue-router.esm.js?8c4f:2357
step @ vue-router.esm.js?8c4f:2004
step @ vue-router.esm.js?8c4f:2008
runQueue @ vue-router.esm.js?8c4f:2012
confirmTransition @ vue-router.esm.js?8c4f:2387
transitionTo @ vue-router.esm.js?8c4f:2260
handleRoutingEvent @ vue-router.esm.js?8c4f:2580

Any work around??

Not available on npm?

yarn add v1.1.0
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@nuxtjs%2fgoogle-adsense: Not found".

update: installing from repo will fail on tests:

$ npm run test

> @nuxtjs/[email protected] test /home/ruslan/.cache/yarn/v1/.tmp/118ad1d31a382ae1c601f8ebcf76842f.72b11f28812644a1e9f0792a090e91d5cbd72188.prepare
> npm run lint && jest


> @nuxtjs/[email protected] lint /home/ruslan/.cache/yarn/v1/.tmp/118ad1d31a382ae1c601f8ebcf76842f.72b11f28812644a1e9f0792a090e91d5cbd72188.prepare
> eslint lib src test


/home/ruslan/.cache/yarn/v1/.tmp/118ad1d31a382ae1c601f8ebcf76842f.72b11f28812644a1e9f0792a090e91d5cbd72188.prepare/lib/index.js
  31:5  error  Unexpected console statement  no-console

✖ 1 problem (1 error, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nuxtjs/[email protected] lint: `eslint lib src test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @nuxtjs/[email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ruslan/.npm/_logs/2017-10-11T22_21_33_765Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nuxtjs/[email protected] test: `npm run lint && jest`
npm ERR! Exit status 1
This question is available on Nuxt.js community (#c1)

Support the new AdSense code

hi!

Does this module support new version of AdSense code?

The new AdSense code allows AdSense to trigger optimization features earlier which can improve the performance of the ads on your site. The new ad code works for both Auto ads and ad units.

Thanks!

如果需要展示固定尺寸广告该如何配置ad-style呢?

大家好,我们想展示固定尺寸广告.在我们希望放置广告的位置插入组件adsbygoogle,我们这样配置

1

date部分:
data: {
astyleObject230: {
display: "inline-block",
width: "250px",
height: "250px",
}
}

网页端展示不是250*250的固定尺寸广告,请问该如何办?谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.