컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
광고 슬롯 새로고침
Google 게시자 태그 (GPT) 라이브러리의 새로고침 기능을 사용하면 페이지의 전체 콘텐츠를 새로고침하지 않고도 광고를 동적으로 다시 로드할 수 있습니다.
이 기능을 구현하려면 GPT 태그를 생성한 다음 이를 약간 수정해야 합니다. 이 샘플 구현에는 두 개의 광고 슬롯과 새 광고가 있는 슬롯을 새로고침하는 버튼이 있습니다.
샘플 구현
데모 보기
[null,null,[],[],[],null,["# Refresh ad slots\n================\n\nYou can use the refresh functionality of the Google Publisher Tag (GPT) library\nto dynamically reload ads without having to refresh the entire contents of your\npage.\n| **Important:** To comply with Google policy and enable your inventory to compete on Ad Exchange, you must [declare which portions of your inventory refresh](http://support.google.com/admanager/answer/6286179).\n\nIn order to implement this functionality, you'll need to generate a GPT tag and\napply some modifications. This sample implementation features two ad slots and\ncorresponding buttons to refresh the slots with new ads.\n\nSample implementation\n---------------------\n\n[View demo](https://googleads.github.io/google-publisher-tag-samples/refresh/js/demo.html) \n\n### JavaScript\n\nLoading...\n----------\n\nLoading...\n----------\n\n[Improve this sample](https://github.com/googleads/google-publisher-tag-samples/tree/main/dist/refresh/js) [Report an issue](https://github.com/googleads/google-publisher-tag-samples/issues/new?labels=documentation&template=sample-feedback.md&title=Sample+feedback%3A+refresh/js)\n\n### TypeScript\n\nLoading...\n----------\n\nLoading...\n----------\n\n[Improve this sample](https://github.com/googleads/google-publisher-tag-samples/tree/main/dist/refresh/ts) [Report an issue](https://github.com/googleads/google-publisher-tag-samples/issues/new?labels=documentation&template=sample-feedback.md&title=Sample+feedback%3A+refresh/ts)"]]