# 基本タグの設置方法

### **基本タグとは**

Ptengineを利用するには、計測対象のページに特定のコードを設置する必要があります。このコードは「基本タグ」または単に「タグ」と呼ばれ、プロジェクトIDを含むJavaScriptコードです。

![](/files/HZ7qdxVANyIGgkjERWvL)

この基本タグをサイトに設置することで、数値データの収集やヒートマップを用いた顧客理解、さらにはポップアップやABテスト、パーソナライゼーションといった施策を一貫して実施できます。

導入は非常に簡単ですので、早速タグを設置し、Webサイトのユーザー体験とコンバージョン率の向上を目指しましょう！

### **タグの設置方法（推奨）**

タグは、サイトのHTMLに直接設置することが推奨されます。

ShopifyでPtengineを利用する場合は、HTMLに直接設置しないようにし、Shopifyの設定手順をご参照ください。

具体的な手順は以下の通りです：

{% stepper %}
{% step %}
**基本設定とタグ取得**

対象プロジェクトにアクセスし、「実装」ボタンをクリックします。または、プロジェクト名の横にある歯車アイコンから「基本設定とタグ取得」をクリックし、解析コードの設定に進んでください。

![](/files/f2ZRxcVfNudz0INX745D)
{% endstep %}

{% step %}
**基本タグをコピー**

基本タグをコピーします。ミスを防ぐため、コピーボタンの使用をお勧めします。

![](/files/Qb5giHbI86fDs27i4BVF)
{% endstep %}

{% step %}
**HTMLにアクセス**

計測したいサイトまたはページのHTMLにアクセスします。
{% endstep %}

{% step %}
**貼り付け**

`head`タグを見つけ、コピーしたタグをその中に貼り付けます。変更を保存し、ページを再読み込みしてください。
{% endstep %}
{% endstepper %}

## 🎦操作動画

{% embed url="<https://app.arcade.software/share/9Co1auPt7xkZweCU7ehH>" %}

### **【関連記事】**

1. HTMLに直接設置が難しい場合、[チラつき（フリッカー現象）](https://gitlab.com/PtmindDev/ptx/ptengine-helps/-/blob/main/DOCS/faq/page_edit/anti-flicker.md)が発生する可能性がありますのでご注意ください。
2. 同じページにPtengineのタグを複数設置すると、正しくデータを計測できません。タグは1ページに1つだけ設置してください。それでも正しく計測されない場合は、[こちらの記事](https://gitlab.com/PtmindDev/ptx/ptengine-helps/-/blob/main/DOCS/faq/start-guide/incorrect-tracking.md)をご確認ください。
3. [ドメインの登録](https://gitlab.com/PtmindDev/ptx/ptengine-helps/-/blob/main/DOCS/insight/setting/add-domain.md)を忘れないようにしてください。
4. その他の設置方法については、[こちらの記事](https://gitlab.com/PtmindDev/ptx/ptengine-helps/-/blob/main/DOCS/ja/othertag/README.md)をご参照ください。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helps.ptengine.com/start-guide/quick/tag-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
