
Security News
The AI Industry Is Betting on Open Weights
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.
@ax2/gpt-ads-module
Advanced tools
Google Publisher Tag ads integration for Nuxt
Integrate Google Publisher Tag with your Nuxt project.
yarn add @ax2/gpt-ads-module
# Or npm i @ax2/gpt-ads-module
@ax2/gpt-ads-module to modules section of nuxt.config.js.// nuxt.config.js
{
modules: [
'@ax2/gpt-ads-module',
],
}
gptAds key to nuxt.config.js.// nuxt.config.js
{
gptAds: {
// Module options
}
}
Array|String: requiredYour network code as found in Google Ad Manager > Admin > Global Settings.
BooleanfalseEnable debug mode, when this is true, GPT console opens when the app loads.
String'GptAd'Name of the component that the module registers.
BooleanfalseIf enabled, ads won't be fetched on page load but will be refreshed individually as they are mounted.
BooleanfalseSet to true to enable responsive mode for all ads slot. In responsive mode, ad slots listen to window resize events and refresh themselves if a different size mapping matches current window size.
BooleanfalseSet to true to have empty ad slots collapsed themselves, this can be overridden at slot-level with collapseEmptyDiv prop.
BooleanfalseSet to true to enable ghost mode. With ghost mode enabled, ad slots aren't displayed and are replaced by empty bordered divs of the size the ads would have if they were displayed. This is useful during development where you might not want to display real ads.
When the module is enabled, it registers a global Vue component that you can use to display ads in your app. By default, the component's name is GptAd but this can be changed via the componentName option.
The component accepts a few props to customize the ads you display.
string: requiredThe ad unit for a given ad as defined in Google Ad Manager > Inventory > Ad units.
Array|string: requiredDefault size for this ad, can be an array ([<width>, <height>]) or a string ('<width>x<height>').
To support multiple sizes, either pass an array of arrays ([[<width>, <height>], [<width>, <height>]]), or a string where dimensions are separated by a comma ('<width>x<height>,<width>x<height>').
Array[]Size mapping for this ad. Each item in the list is an array of its own, where the first item is the browser size, and the second is the expected ad's size(s) for the breakpoint.
Sizes should either be arrays in the form [<width>, <height>] or strings in the form '<width>x<height>'.
Boolean<%= options.responsive %>Turn responsive mode on or off for specific ads, defaults to module's responsive option.
Number300Debounce duration between each window resize handling.
BooleannullOverride collapseEmptyDivs option at the slot's level.
<template>
<GptAd
ad-unit="SOME-AD-UNIT"
:size="[120, 60]"
:size-mapping="[
[[1024, 768], [970, 250]],
[[980, 690], [728, 90]],
[[640, 480], [120, 60]],
[[0, 0], [88, 31]],
]" />
</template>
Equivalent:
<template>
<GptAd
ad-unit="SOME-AD-UNIT"
size="120x60"
:size-mapping="[
['1024x768', '970x250'],
['980x690', '728x90'],
['640x480', '120x60'],
['0x0', '88x31'],
]" />
</template>
yarn install or npm installnpm run devCopyright (c) Ax2 Inc.
FAQs
Google Publisher Tag ads integration for Nuxt
The npm package @ax2/gpt-ads-module receives a total of 27 weekly downloads. As such, @ax2/gpt-ads-module popularity was classified as not popular.
We found that @ax2/gpt-ads-module demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.