Skip to content

Commit f192b6f

Browse files
committed
fixad
1 parent a10e659 commit f192b6f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/components/GoogleScripts.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ function Gad({
9999
.defineSlot?.('/23278945940/TopLevel', adSlot.sizes, adSlot.id)
100100
.addService(googletag.pubads?.())
101101
.setTargeting(adSlot.targeting, [adSlot.targeting])
102+
googletag.pubads?.().enableSingleRequest()
103+
googletag.enableServices?.()
104+
googletag.display?.(adId)
105+
} else {
106+
googletag.display?.(adId)
107+
googletag.pubads?.().refresh([adSlot.slot])
102108
}
103109

104-
googletag.pubads?.().enableSingleRequest()
105-
googletag.enableServices?.()
106-
googletag.display?.(adId)
107-
108110
// Set individual refresh intervals for each ad
109111
const interval = setInterval(function () {
110112
cmd.push(function () {

0 commit comments

Comments
 (0)