# 再营销标签

重定向标签是一段广告主添加到网站或登录页面的 JavaScript 代码。它有助于跟踪网站上的用户行为。当用户/访客访问网站时，它会收集一些数据，例如访问的页面、IP 地址和 cookie 详细信息等。它有助于在访问后对用户进行重新定向。

要在广告活动中保存关联方的重定向代码，请按照以下步骤操作：

#### 1. 转到优惠 **»** 优惠 - 已批准

<figure><img src="/files/3ff35b338db13c822298bf5f58a6bb07837cbc67" alt=""><figcaption></figcaption></figure>

#### 2. 单击活动名称 / ID 进入其配置面板。&#x20;

#### 3. 转到 更多 **»** 重定向标签

<figure><img src="/files/7f99b27d91a83e14fd4e48698bbde7d5f9d6ea51" alt=""><figcaption></figcaption></figure>

#### 4. 点击“+ 添加重定向标签”

#### 5. 定义标签名称，选择关联方 ID

#### 6. 填写 URL（可选）

#### 7. 将关联方的重定向代码/脚本放入“代码”中 **»** 提交&#x20;

提交后，Offer18 的重定向脚本将被生成并需要放置在网站上。您可以轻松更改关联方的重定向代码。Offer18 的重定向脚本将需要一些时间来更新。

<figure><img src="/files/906c968e87cd1e35d394816008a9ae4a77416aa8" alt=""><figcaption></figcaption></figure>

***

### 全局重定向标签

要使用全局重定向代码，请按照以下说明操作

#### **活动设置**

对于全局重定向代码，必须在 Offer URL 中以及在 Offer18 仪表盘创建活动时的所有着陆页中包含 affiliate Id（关联方 ID）和 offer Id 参数以及 token。

```
https://example.com/?aff_id={aff_id}&offer_id={offerid} 
```

此代码用于放置在广告主的网站上。它将自动检测相关的浏览器数据并相应地执行重定向脚本。

{% code overflow="wrap" %}

```javascript
<script>function p(n){return new URLSearchParams(window.location.search).get(n);}var a=p("aff_id"),o=p("offer_id");if(a&&o){var s=document.createElement("script");s.src="https://web-resources-dyn.offer18a.net/sdk/web/WebRTG.js?t=ao&a="+a+"&o="+o;s.async=true;document.body.appendChild(s);}</script>
```

{% endcode %}


---

# 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://knowledgebase.offer18.com/zh/wang-luo/offers/zai-ying-xiao-biao-qian.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.
