# 範例：Waca 分享 X

## 新增觸發條件

<figure><img src="/files/TbuQE6OXVBhYCVk2b9Ip" alt=""><figcaption><p>新增觸發事件</p></figcaption></figure>

<figure><img src="/files/POZo8qO6d9d4m4tIXo0Z" alt=""><figcaption><p>觸發條件</p></figcaption></figure>

* 觸發名稱：waca\[share\_x] (可更改)
* 觸發條件類型：點擊 - 僅連結
* 啟動時機：部分的連結點擊
* 觸發條件：「Click Classes」 「包含」 「 btn\_link\_twitter」
* 按下「儲存」

***

## 新增代碼

<figure><img src="/files/TsPmKE7iTBfCefncuxWT" alt=""><figcaption><p>建立代碼</p></figcaption></figure>

<figure><img src="/files/SMxasbtUXEIREXguAopI" alt=""><figcaption><p>分享追追蹤代碼</p></figcaption></figure>

* 代碼名稱： \[waca] share\_x
* 代碼類型：自訂 HTML
* HTML：複製下面內容程式碼貼上

```javascript
<script>
var title = document.title;

if(title !== undefined && title != ''){
	itg('event', 'action',{
	    'type': 'share',             
	    'category': 'x',
	    'label': title
	});
}
</script>
```

* 觸發條件：waca\[share\_x]（ [#xin-zeng-chu-fa-tiao-jian](#xin-zeng-chu-fa-tiao-jian "mention") ）

按下右上角 「儲存」 按鈕後，點擊右上角 「提交」 並且 「發布」 即可生效。

#### 提醒

* 請先用「預覽」功能測試，確認 「Tags Fired」 是否有觸發成功


---

# 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://instag.gitbook.io/doc/cheng-shi-ma-zi-ding-an-zhuang/fen-xiang-zhui-zong/waca/fan-li-waca-fen-xiang-x.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.
