# Etiqueta de retargeting

La etiqueta de retargeting es un fragmento de código JavaScript que un anunciante añade a un sitio web o página de destino. Ayuda a rastrear el comportamiento del usuario en un sitio web. Cuando un usuario/visitante visita el sitio web, recopila algunos datos como la página visitada, la dirección IP y los detalles de las cookies, etc. Es útil para volver a orientar al usuario después de sus visitas.

Para guardar el código de retargeting de un afiliado en la oferta, siga estos pasos:

#### 1. Ir a Offers **»** Offer - Aprobado

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

#### 2. Haga clic en el nombre / ID de la Oferta para entrar en su panel de configuraciones.&#x20;

#### 3. Vaya a Más **»** Etiquetas de Retargeting

<figure><img src="/files/501f52f4a69875ac0d5e44111e6ab9d664ee4e54" alt=""><figcaption></figcaption></figure>

#### 4. Haga clic en "+ Añadir etiqueta de retargeting"

#### 5. Defina el nombre de la etiqueta, seleccione el ID del afiliado

#### 6. Coloque la URL (opcional)

#### 7. Coloque el código/script de retag del afiliado en "Código" **»** Enviar&#x20;

Tras enviar, se generará el script de retargeting de Offer18 y deberá colocarse en el sitio web. Puede realizar cambios fácilmente en el código de retargeting del afiliado. El script de retargeting de Offer18 tardará algún tiempo en actualizarse.

<figure><img src="/files/8f61801623cea281b23ecdac8a87a795b5f41783" alt=""><figcaption></figcaption></figure>

***

### Etiqueta de Retargeting Global

Para usar el código de retargeting global, siga las instrucciones que se indican a continuación

#### **Configuración de la Oferta**

Para el código de retargeting global, es obligatorio incluir el parámetro affiliate Id y offer Id y el token en la URL de la Oferta y también en todas las páginas de destino al crear la oferta en el panel de Offer18.

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

Este código está pensado para su colocación en el sitio web del anunciante. Detectará automáticamente los datos relevantes del navegador y ejecutará el script de retargeting en consecuencia.

{% 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/es/red/ofertas/etiqueta-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.
