Skip to content

Commit 29b542d

Browse files
Updates (#384)
1 parent 8ed2ee1 commit 29b542d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

app/components/GoogleScripts.tsx

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ const adSlots = {
1212
id: 'div-gpt-ad-1738811978953-leaderboard',
1313
sizes: [[728, 90]],
1414
targeting: 'leaderboard',
15-
refreshInterval: 45_000, // 45 seconds
15+
refreshInterval: 90_000, // 45 seconds
1616
},
1717
footer: {
1818
id: 'div-gpt-ad-1738811978953-footer',
1919
sizes: [[728, 90]],
2020
targeting: 'footer',
21-
refreshInterval: 45_000, // 45 seconds
21+
refreshInterval: 90_000, // 45 seconds
2222
},
2323
rightRail: {
2424
id: 'div-gpt-ad-1738811978953-right-rail',
2525
sizes: [[300, 250]],
2626
targeting: 'right-side-rail',
27-
refreshInterval: 45_000, // 45 seconds
27+
refreshInterval: 90_000, // 45 seconds
2828
},
2929
leftRail: {
3030
id: 'div-gpt-ad-1738811978953-left-rail',
3131
sizes: [[300, 250]],
3232
targeting: 'left-side-rail',
33-
refreshInterval: 45_000, // 45 seconds
33+
refreshInterval: 90_000, // 45 seconds
3434
},
3535
} satisfies Record<
3636
string,
@@ -74,14 +74,14 @@ function Gad({
7474
window.googletag.enableServices()
7575
window.googletag.display(adId)
7676

77-
// // Set individual refresh intervals for each ad
78-
// const interval = setInterval(function () {
79-
// window.googletag.cmd.push(function () {
80-
// window.googletag.pubads().refresh([slot])
81-
// })
82-
// }, slot.refreshInterval)
77+
// Set individual refresh intervals for each ad
78+
const interval = setInterval(function () {
79+
window.googletag.cmd.push(function () {
80+
window.googletag.pubads().refresh([slot])
81+
})
82+
}, slot.refreshInterval)
8383

84-
// return () => clearInterval(interval)
84+
return () => clearInterval(interval)
8585
})
8686
}
8787
}, [])

0 commit comments

Comments
 (0)