# 広告スクリプトの設置場所はどこですか？

**URL:** https://meta.discourse.org/t/where-to-place-ad-script/125640
**Category:** Support
**Created:** [2019 年 8 月 13 日午前 8:01 UTC](https://meta.discourse.org/t/where-to-place-ad-script/125640 "2019-08-13T08:01:43Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [2019 年 8 月 13 日午前 10:24 UTC](https://meta.discourse.org/t/where-to-place-ad-script/125640/4 "2019-08-13T10:24:33Z")

</div>

では、ここから始めましょう。

> [@Beginner's guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966):
>
> This is a crash course in Discourse theme basics. The target audience is everyone who is not familiar with Discourse themes. If you’ve already used Discourse theme / theme components, this guide is probably not something you need to read. What are themes and theme components? A theme or theme component is a set of files packaged together designed to either modify Discourse visually or to add new features. Let’s start with themes. Themes In general, themes are not supposed to be compatible …

あなたの目的は、テーマコンポーネントを作成し、`/head` タブに広告の `<script>` を追加し、メインテーマでそのテーマコンポーネントを有効化することです。

テーマコンポーネントを有効化したら、以下の手順に従ってスクリプトの URL をホワイトリストに登録する必要があります。

> [@Mitigate XSS Attacks with Content Security Policy](https://meta.discourse.org/t/mitigate-xss-attacks-with-content-security-policy/104243):
>
> bookmark This guide explains how to use Content Security Policy (CSP) to mitigate Cross-Site Scripting (XSS) attacks in Discourse. It covers CSP basics, configuration, and best practices. person_raising_hand Required user level: Administrator Summary Content Security Policy (CSP) is a crucial security feature in Discourse that helps protect against Cross-Site Scripting (XSS) and other injection attacks. This guide covers the basics of CSP, how it’s implemented in Discourse, and how to c…

---

_[View the full topic](https://meta.discourse.org/t/where-to-place-ad-script/125640)._
