Learn how to configure targeting and refresh ads at runtime.
Refreshing Ads
Use refreshAdsViaDivMappings to request ad fills for specific placements on your page. Call it on initial mount and
again whenever the page context changes (for example, on route navigation).
You may not pass any user-identifiable data (including names, addresses, or user IDs) in targeting.
Each mapping describes one ad slot:
divId — the id of the DOM element where the ad renders.
baseDivId — the base selector for the ad unit (for example, .htlad-medrec). Overlayed works with you to pre-approve
the set of base selectors your app uses.
targeting — optional per-slot key-value targeting merged with page-level targeting.
Page-Level Targeting
For targeting that applies to every subsequent ad request, use setPageTargeting:
import { setPageTargeting } from "@overlayed/ads";setPageTargeting({ page_id: "HomePage" });
init() automatically sets app_id page targeting for you.
Conditionally Disabling Ads
There is no runtime method to toggle ads on and off. To hide ads for a user (for example, a paid subscriber), do not
mount the ads script for that user and do not render the ad containers in your UI. See the
setup guide for how to conditionally mount the script.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Overlayed","colors":{"primary":"#3489eb","light":"#76a5db","dark":"#1b5eab"},"logo":{"light":"https://mintcdn.com/overlayed/NjkLE7VgHNllkGf9/logo/logo-with-text-dark.webp?fit=max\u0026auto=format\u0026n=NjkLE7VgHNllkGf9\u0026q=85\u0026s=9a95df5e68f6e3a67cd604bc4ffc3436","dark":"https://mintcdn.com/overlayed/NjkLE7VgHNllkGf9/logo/logo-with-text.webp?fit=max\u0026auto=format\u0026n=NjkLE7VgHNllkGf9\u0026q=85\u0026s=0e07d6d4259e69518078b1c07a25ee0c"},"favicon":"https://mintcdn.com/overlayed/lLO1lk9TCoDk13HP/favicon.svg?fit=max\u0026auto=format\u0026n=lLO1lk9TCoDk13HP\u0026q=85\u0026s=fa929ac3b1a7a174cb8e4f266f5db05e","navbar":{"links":[{"href":"https://overlayed.gg","label":"Marketing Site"},{"href":"mailto:support@overlayed.gg","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://overlay.dev"}},"contextual":{"options":["copy","chatgpt","claude","cursor","vscode","mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"overlayed","hasAudioNarration":false,"actualSubdomain":"overlayed","customDomains":["docs.overlayed.gg"],"gitSource":{"type":"github","owner":"overlayed-gg","repo":"overlayed-typescript","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6afcee8995c23b69d00f26c2","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"Docs","count":32},{"language":"default","tag":"Guides","count":22},{"language":"default","tag":"Packages","count":11},{"language":"default","tag":"Supported Games","count":10},{"language":"default","tag":"Essentials","count":7},{"language":"default","tag":"@overlayed/app","count":5},{"language":"default","tag":"Deployment","count":4},{"language":"default","tag":"Logging","count":4},{"language":"default","tag":"Windows","count":4},{"language":"default","tag":"Ads","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"ads/configuration","slug":"/ads/configuration","pageMetadata":{"title":"Overlay Ads Configuration","sidebarTitle":"Configuration","description":"Learn how to configure targeting and refresh ads at runtime.","href":"/ads/configuration"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to configure targeting and refresh ads at runtime.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`refreshing-ads`,children:`Refreshing Ads`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`refreshAdsViaDivMappings`}),` to request ad fills for specific placements on your page. Call it on initial mount and\nagain whenever the page context changes (for example, on route navigation).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` overlayedAds`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@overlayed/ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`overlayedAds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`refreshAdsViaDivMappings`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tdivId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"right-rail-2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tbaseDivId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \".htlad-medrec\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\ttargeting:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`page_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"HomePage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tdivId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"right-rail-3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tbaseDivId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \".htlad-medrec\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:`You may not pass any user-identifiable data (including names, addresses, or user IDs) in targeting.`}),`\n`,_jsx(_components.p,{children:`Each mapping describes one ad slot:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`divId`}),` — the `,_jsx(_components.code,{children:`id`}),` of the DOM element where the ad renders.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`baseDivId`}),` — the base selector for the ad unit (for example, `,_jsx(_components.code,{children:`.htlad-medrec`}),`). Overlayed works with you to pre-approve\nthe set of base selectors your app uses.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`targeting`}),` — optional per-slot key-value targeting merged with page-level targeting.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`page-level-targeting`,children:`Page-Level Targeting`}),`\n`,_jsxs(_components.p,{children:[`For targeting that applies to every subsequent ad request, use `,_jsx(_components.code,{children:`setPageTargeting`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`setPageTargeting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@overlayed/ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setPageTargeting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`page_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"HomePage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`init()`}),` automatically sets `,_jsx(_components.code,{children:`app_id`}),` page targeting for you.`]}),`\n`,_jsx(Heading,{level:`2`,id:`conditionally-disabling-ads`,children:`Conditionally Disabling Ads`}),`\n`,_jsxs(_components.p,{children:[`There is no runtime method to toggle ads on and off. To hide ads for a user (for example, a paid subscriber), do not\nmount the ads script for that user and do not render the ad containers in your UI. See the\n`,_jsx(_components.a,{href:`/ads/introduction#adding-the-ads-script`,children:`setup guide`}),` for how to conditionally mount the script.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Overlay Ads Configuration","sidebarTitle":"Configuration","description":"Learn how to configure targeting and refresh ads at runtime.","href":"/ads/configuration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Refreshing Ads","slug":"refreshing-ads","depth":2,"children":[]},{"title":"Page-Level Targeting","slug":"page-level-targeting","depth":2,"children":[]},{"title":"Conditionally Disabling Ads","slug":"conditionally-disabling-ads","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"overlayed","siteName":"Overlayed","title":"Overlay Ads Configuration - Overlayed","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-13T17:07:09.491Z","originalFileLocation":"ads/configuration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to configure targeting and refresh ads at runtime.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Overlayed\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Overlay Ads Configuration - Overlayed\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to configure targeting and refresh ads at runtime.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Overlayed\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.overlayed.gg/ads/configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://overlayed.mintlify.site/_mintlify/api/og/v2?division=Ads\u0026amp;title=Overlay+Ads+Configuration\u0026amp;description=Learn+how+to+configure+targeting+and+refresh+ads+at+runtime.\u0026amp;theme=445349523a3ea9ff343c424e\u0026amp;signature=b459a3be6d86762549df402d3b7c18365843fef62f3ccb13c5a0563a1c8ad6cc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Overlay Ads Configuration - Overlayed\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to configure targeting and refresh ads at runtime.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://overlayed.mintlify.site/_mintlify/api/og/v2?division=Ads\u0026amp;title=Overlay+Ads+Configuration\u0026amp;description=Learn+how+to+configure+targeting+and+refresh+ads+at+runtime.\u0026amp;theme=445349523a3ea9ff343c424e\u0026amp;signature=b459a3be6d86762549df402d3b7c18365843fef62f3ccb13c5a0563a1c8ad6cc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/overlayed/9j0jnwVWRyevrtyx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Overlayed\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3489eb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.overlayed.gg/ads/configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ads/configuration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.overlayed.gg/#organization\",\"name\":\"Overlayed\",\"url\":\"https://docs.overlayed.gg\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/overlayed/NjkLE7VgHNllkGf9/logo/logo-with-text-dark.webp?fit=max\u0026auto=format\u0026n=NjkLE7VgHNllkGf9\u0026q=85\u0026s=9a95df5e68f6e3a67cd604bc4ffc3436\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.overlayed.gg#website\",\"name\":\"Overlayed\",\"url\":\"https://docs.overlayed.gg\",\"publisher\":{\"@id\":\"https://docs.overlayed.gg/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.overlayed.gg/ads/configuration#webpage\",\"url\":\"https://docs.overlayed.gg/ads/configuration\",\"name\":\"Overlay Ads Configuration\",\"description\":\"Learn how to configure targeting and refresh ads at runtime.\",\"dateModified\":\"2026-05-13T17:07:09.491Z\",\"isPartOf\":{\"@id\":\"https://docs.overlayed.gg#website\"},\"breadcrumb\":{\"@id\":\"https://docs.overlayed.gg/ads/configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.overlayed.gg/ads/configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ads\",\"item\":\"https://docs.overlayed.gg/ads/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Overlay Ads Configuration\",\"item\":\"https://docs.overlayed.gg/ads/configuration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.overlayed.gg/ads/configuration#article\",\"headline\":\"Overlay Ads Configuration\",\"name\":\"Overlay Ads Configuration\",\"description\":\"Learn how to configure targeting and refresh ads at runtime.\",\"url\":\"https://docs.overlayed.gg/ads/configuration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.overlayed.gg/ads/configuration#webpage\"},\"dateModified\":\"2026-05-13T17:07:09.491Z\",\"publisher\":{\"@id\":\"https://docs.overlayed.gg/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.overlayed.gg#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Overlayed\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Overlayed\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ads/configuration.md","siteName":"Overlayed","nav":{"global":null,"tabs":[{"tab":"Docs","groups":[{"group":"Get Started","pages":[{"title":"Welcome to Overlayed","href":"/introduction"},{"title":"Quickstart","href":"/quick-start"},{"title":"TypeScript First","href":"/typescript"}]},{"group":"Essentials","pages":[{"title":"App Structure","sidebarTitle":"App Structure","href":"/essentials/app-structure"},{"title":"Overlayed Config","sidebarTitle":"Overlayed Config","href":"/essentials/overlayed-config"},{"title":"Local Development","href":"/essentials/local-development"},{"title":"Overlay Events","href":"/essentials/overlay-events"},{"title":"Game Events","sidebarTitle":"Game Events","href":"/essentials/game-events"},{"title":"App Issue Handling","href":"/essentials/issue-handling"},{"title":"Security","href":"/essentials/security"}]},{"group":"Windows","pages":[{"title":"Overlay Windows","sidebarTitle":"Creating Windows","href":"/windows/introduction"},{"title":"Navigation Guard","href":"/windows/navigation-guard"},{"title":"Render Windows","href":"/windows/render-windows"},{"title":"Global Window Events","sidebarTitle":"Window Events","href":"/windows/events"}]},{"group":"Keybinds","pages":[{"title":"Keybinds","sidebarTitle":"Setup Keybinds","href":"/keybinds/introduction"}]},{"group":"Notices","pages":[{"title":"Notices","sidebarTitle":"Notifying Users","href":"/notices/introduction"}]},{"group":"Feature Flags","pages":[{"title":"Feature Flags","sidebarTitle":"Gating Features","href":"/feature-flags/introduction"}]},{"group":"Event \u0026 Log Tracking","pages":[{"title":"Event \u0026 Log Tracking","sidebarTitle":"Track Custom Analytics","href":"/event-tracking/introduction"}]},{"group":"Logging","pages":[{"title":"Logging","sidebarTitle":"How Logging Works","href":"/logging/introduction"},{"title":"User Feedback","sidebarTitle":"User Feedback","href":"/logging/user-feedback"},{"title":"Crash Dumps","sidebarTitle":"Crash Dumps","href":"/logging/crash-dumps"},{"title":"Debug Mode","sidebarTitle":"Debug Mode","href":"/logging/debug-mode"}]},{"group":"Deployment","pages":[{"title":"Understanding Bundles","href":"/deployment/introduction"},{"title":"Updates","sidebarTitle":"Updates","href":"/deployment/updates"},{"title":"Private Channels","sidebarTitle":"Private Channels","href":"/deployment/private-channels"},{"title":"Update Rules","sidebarTitle":"Update Rules","href":"/deployment/update-rules"}]},{"group":"Ads","pages":[{"title":"Overlay Ads","sidebarTitle":"Monetize Your Overlay","description":"Ads allow you to monetize your overlay, this guide will cover various utilities we provide for managing them.","href":"/ads/introduction"},{"title":"Overlay Ads Configuration","sidebarTitle":"Configuration","href":"/ads/configuration"},{"title":"Overlay Ads Setup","sidebarTitle":"Ad Unit Setup","description":"Learn how to setup ad units in your overlay.","href":"/ads/ads-setup"}]},{"group":"Advanced","pages":[{"title":"Blocking Input","href":"/advanced/blocking-input"},{"title":"Delayed Initialization","href":"/advanced/delayed-init"}]},{"group":"Extras","pages":[{"title":"Model Context Protocol","sidebarTitle":"MCP","href":"/extras/mcp"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Packages","pages":[{"title":"Packages","href":"/packages/app"}]},{"tab":"Supported Games","pages":[{"title":"Supported Games","href":"/games/introduction"}]}]},"basePath":"","title":"Overlay Ads Configuration - Overlayed","deploymentId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","buildId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","dynamics":[],"chunks":[]}