Skip to content

Commit

Permalink
chore: use after interactive strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
joshxfi authored Feb 29, 2024
2 parents 464c32f + 7b8e8ca commit 0a31a42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions apps/web/src/components/AdContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ const AdContainer = ({ slotId, className, test }: Props) => {
}, []);

return (
<ins
className={twMerge('adsbygoogle', className, test && 'h-24 bg-blue-200')}
style={{ display: 'block' }}
data-ad-client='ca-pub-4274133898976040'
data-ad-slot={slotId}
data-ad-format='auto'
data-full-width-responsive='true'
/>
<div className={twMerge(className, test && 'h-24 bg-blue-200')}>
<ins
className='adsbygoogle'
style={{ display: 'block' }}
data-ad-client='ca-pub-4274133898976040'
data-ad-slot={slotId}
data-ad-format='auto'
data-full-width-responsive='true'
/>
</div>
);
};

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Document() {
<NextScript />
<Script
async
strategy='beforeInteractive'
strategy='afterInteractive'
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4274133898976040'
crossOrigin='anonymous'
/>
Expand Down

0 comments on commit 0a31a42

Please sign in to comment.