# google-ad-manager-vue

> Google Ad Manager Plugin for Vue

Latest version **1.0.2** (published 2020-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install google-ad-manager-vue
pnpm add google-ad-manager-vue
yarn add google-ad-manager-vue
bun add google-ad-manager-vue
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-12-10 |
| First published | 2020-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Milos Moravac |
| Maintainers | mmoravac |
| Keywords | vuejs, ad, manager, google, dfp, doubleclick, vue |

## Links

- npm: https://www.npmjs.com/package/google-ad-manager-vue
- Repository: https://github.com/mmoravac/vue-google-ad-manager
- Homepage: https://github.com/mmoravac/vue-google-ad-manager#readme
- Issues: https://github.com/mmoravac/vue-google-ad-manager/issues
- npm.io page: https://npm.io/package/google-ad-manager-vue

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-12-10
- 1.0.1 — 2020-12-10
- 1.0.0 — 2020-12-10

## README

# Google Ad Manager for Vue
Vue.js plugin to easy implement google ad units to your SPA

## Installation

**Install**

```
npm install google-ad-manager-vue
```
*or*
```
yarn add google-ad-manager-vue
```

**Import and use the plugin in your main.js or entry file** 
You must pass in your network code and mappings. Sizes object is optional. Example below. 

```javascript
import AdManager from 'google-ad-manager-vue';

let mappings = {
	banner:[
		{ window :[0,0], sizes: [ [320,50] ] },
		{ window :[980,0], sizes: [ [720,60],[728,90] ] }
	],
	rectangle:[
		{ window: [0, 0], sizes: [ [300, 250] ] },
        { window: [980, 0], sizes: [ [300, 250] ] }
	]
}

let sizes = {
	banner: [ [720, 60],[728, 90],[320, 50] ],
	rectangle: [ [300, 250] ]
};

Vue.use(AdManager, {
    id: 'ad-manager-network-code',
	mappings,
	sizes //optional
});
```

**Params**

| Title  | Description  | Type  | Required  |
| ------------ | ------------ | ------------ | ------------ |
| mappings  | Mapping sizes object  | object  | true  |
| sizes  | Google ad unit sizes  | object  | false  |


## Use
Now you can use the google ad component throughout your application. There are a few params you can pass through for customization

```html
<google-ad unit="AdUnitName"></google-ad>
```

**Params**


| Title  | Description  | Type  | Required  |
| ------------ | ------------ | ------------ | ------------ |
| unit  |  Ad unit name from ad manager  | string  | true  |
| id  | Div id tag - used to identify ads  | string  | false  |


## Contributing

Pull requests welcomed!

---
_Source: https://npm.io/package/google-ad-manager-vue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
