Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ added to the `<head>` section of your pages.
| `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`.
| `hideUnfilled` | 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.
Expand Down Expand Up @@ -130,7 +130,7 @@ Please refer to the adsense documentation for more info.
| ---- | ---- | -----------
|`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'.
| `isUnfilled` | computed ref | Tracks unfilled attribute on ad element. Returns `true` if `data-ad-status` = '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
Expand Down
1 change: 0 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export default defineNuxtModule<ModuleOptions>({
head.script = head.script ?? []

head.script.push({
key: 'adsbygoogle-script',
defer: true,
crossorigin: 'anonymous',
src: `${ADSENSE_URL}?client=${options.id}`,
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/Adsbygoogle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const {
adLayout?: string | null
adLayoutKey?: string | null
adStyle?: Record<string, string>
adFullWidthResponsive?: boolean
fullWidthResponsive?: boolean
hideUnfilled?: boolean
pageUrl?: string | null
analyticsUacct?: string
analyticsDomainName?: string
includeQuery?: boolean
}>(),
{
adFullWidthResponsive: false,
fullWidthResponsive: false,
adLayout: null,
adLayoutKey: null,
pageUrl: null,
Expand Down Expand Up @@ -78,7 +78,7 @@ defineExpose({ isUnfilled, updateAd, showAd })
:data-analytics-domain-name="dataAnalyticsDomainName"
:data-adtest="dataAdTest"
:data-adsbygoogle-status="status"
:data-ad-full-width-responsive="adFullWidthResponsive"
:data-full-width-responsive="fullWidthResponsive"
/>
</template>

Expand Down