vue-adsense

Google Adsense for Vue
1,329 77
Install
npm install vue-adsense
Latest Version:1.0.1
License:MIT
Last Updated:Oct 18, 2017
Links: GitHub  ·  npm
Maintainer: darrynten

Google Adsense for Vue

npm version

vue-adsense

A simple Vue component for handling Google Ads

Installation

npm install --save-dev vue-adsense

and include the adsbygoogle.js file in your HTML

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

Usage

Import the component

import VueAdsense from 'vue-adsense'

Register the component

Vue.component('adsense', VueAdsense)

And put into your DOM

<adsense
  ad-client="ca-pub-xxxxxxxxxxxxxxxx"
  ad-slot="XXXXXXXX"
  ad-style="display: block"
  ad-format="auto">
</adsense>
</div>

Values

  • ad-client - Your Google Adsense publisher account
  • ad-slot - The desired ad ID
  • ad-style - Any special styling you want
  • ad-format - Provided by Google, is usually 'auto'
Notes

Contributions welcome, enjoy the component

Related Packages

vue-custom-google-autocomplete

Custom your Google Autocomplete search

1,777 32
@pderas/vue2-geocoder

A vue 2 plugin to interact with google maps api

18,717 14
@dullar/mercury

Advanced and highly reusable Mobile UI Components built on Vue2 & You can define...

8,553 6
vue-auth0-handler

Vue2 Component to handle login/logout and authentication callbacks from Auth0's...

1,113 1
@ezoic/vue-sdk

Official Ezoic ads SDK for Vue 3 — script management, display placeholders, SPA...

504 0

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT