# Tag de Retargeting

A tag de retargeting é um trecho de código JavaScript que um anunciante adiciona a um site ou página de destino. Ela ajuda a rastrear o comportamento do usuário em um site. Quando um usuário/visitante acessa o site, ela coleta alguns dados como a página visitada, endereço IP e detalhes de cookies, etc. É útil para retargeting do usuário após as visitas.

Para salvar o código de retargeting de um afiliado na oferta, siga estes passos:

#### 1. Vá para Offers **»** Offer - Aprovado

<figure><img src="/files/7758e6662b42407d515cc1242f39eaf0b8080062" alt=""><figcaption></figcaption></figure>

#### 2. Clique no nome/ID da Oferta para entrar no painel de configurações.&#x20;

#### 3. Vá para Mais **»** Tags de Retargeting

<figure><img src="/files/c08af6b7607cff3ce82aecdc9917fc34921de3a5" alt=""><figcaption></figcaption></figure>

#### 4. Clique em "+ Adicionar Tag de Retargeting"

#### 5. Defina o nome da tag, selecione o ID do Afiliado

#### 6. Insira a URL (opcional)

#### 7. Coloque o código/script de retag do afiliado em "Código" **»** Enviar&#x20;

Após o envio, o script de retargeting do Offer18 será gerado e precisa ser colocado no site. Você pode facilmente fazer alterações no código de retargeting do afiliado. O script de retargeting do Offer18 levará algum tempo para ser atualizado.

<figure><img src="/files/dd727de390dd2ce37e848e2cd480c318f9a914b2" alt=""><figcaption></figcaption></figure>

***

### Tag de Retargeting Global

Para usar o código de retargeting Global, siga as instruções abaixo

#### **Configuração da Oferta**

Para o código de retargeting Global, é obrigatório incluir o parâmetro affiliate Id e offer Id e o token na URL da Oferta e também em todas as páginas de destino ao criar a oferta no painel do Offer18.

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

Este código destina-se ao posicionamento no site do anunciante. Ele detectará automaticamente os dados relevantes do navegador e executará o script de retargeting de acordo.

{% 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/pt/rede/ofertas/tag-de-retargeting.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.
