# Página de pre-landing

La página Pre-landing es como una página de tránsito que ayuda a los usuarios a llegar a páginas de destino concretas según sus requisitos. Actúa como un enlace entre las fuentes de tráfico y la página de destino de la oferta. Las páginas Pre-landing para anuncios push y nativos son muy útiles para aumentar las conversiones.

### Configuración (Página Pre-landing)

#### 1. **Ofertas » Oferta-Aprobada**

#### 2. Seleccionar **Oferta » General**&#x20;

#### 3. Seleccione "**Pre-landing**" de "**Tipo**" en el desplegable y agregue la "**URL de Pre-landing**" bajo "**Página de destino**" Campo.

<pre class="language-markup" data-title="Token para anexar en la URL" data-overflow="wrap"><code class="lang-markup"><strong>landing_page={pre_landing} (Obligatorio)
</strong>
Anexe tokens y parámetros para valores de datos según sus requisitos. Puede elegir y agregar pares clave-valor de las opciones que se muestran abajo.

 1. aff_click_id={aff_click_id} 
 2. sub_aff_id={sub_aff_id}
 3. aff_sub1={aff_sub1}
 4. aff_sub2={aff_sub2}
 5. aff_sub3={aff_sub3}
 6. aff_sub4={aff_sub4}
 7. aff_sub5={aff_sub5}
 8. googleaid={googleaid}
 9. deviceid={deviceid}
 10. iosidfa={iosidfa}
 11. source={source}
</code></pre>

{% code title="Ejemplo de Página de Destino" overflow="wrap" %}

```
https://example-pre-landing.com?landing_page={pre_landing}&aff_click_id={aff_click_id}&sub_aff_id={sub_aff_id}&aff_sub1={aff_sub1}&source={source}
```

{% endcode %}

<figure><img src="/files/87482fa9ee01fbf0560706145e6e50e38cbebd35" alt=""><figcaption></figcaption></figure>

#### 4. Añada los tokens de Offer18 a la URL de la Oferta para pasar los valores requeridos al anunciante.

{% code title="Tokens de valor del afiliado" overflow="wrap" %}

```
{aff_click_id}, {sub_aff_id}, {aff_sub1}, {aff_sub2}, {aff_sub3}, {aff_sub4}, {aff_sub5}, {googleaid}, {deviceid}, {iosidfa}, {source}
```

{% endcode %}

#### 5. **Enviar para guardar los cambios**

***

### URL de seguimiento del afiliado (Página Pre-landing)

1. Iniciar sesión en el Panel del Afiliado
2. **Ofertas » Mis Ofertas (aprobadas) » Seleccionar Oferta**
3. Seleccione el **Página Pre-landing** del desplegable

<figure><img src="/files/0badeadade8c8e7ef0af8243bda50f57144be04a" alt=""><figcaption></figcaption></figure>

4\. **Obtener URL de** **Seguimiento de Afiliado**&#x20;

***

### Crear página web (Página Pre-landing)

Cree una página web usando el siguiente script que tenga la misma URL utilizada en la Configuración

```javascript
  <script>
    function base64_decode(r) { if ("function" == typeof this.window.atob) return atob(r); var n, t, e, i, o, f, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", d = 0, h = 0, c = []; if (!r) return r; r += ""; do { n = (f = a.indexOf(r.charAt(d++)) << 18 | a.indexOf(r.charAt(d++)) << 12 | (i = a.indexOf(r.charAt(d++))) << 6 | (o = a.indexOf(r.charAt(d++)))) >> 16 & 255, t = f >> 8 & 255, e = 255 & f, c[h++] = 64 == i ? String.fromCharCode(n) : 64 == o ? String.fromCharCode(n, t) : String.fromCharCode(n, t, e) } while (d < r.length); return c.join("") }
    function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { vars[key] = value; }); return vars; }
    function getUrlParam(parameter) { var urlparameter = ''; if (window.location.href.indexOf(parameter) > -1) { urlparameter = getUrlVars()[parameter]; } return base64_decode(urlparameter); }
    function getQueryParam(param) { const urlParams = new URLSearchParams(window.location.search); return urlParams.get(param) ? urlParams.get(param) : ''; }
    function createQueryString(mapping) { let queryString = Object.keys(mapping).map(key => { let value = getQueryParam(key); return value ? `${mapping[key]}=${value}` : ''; }).filter(param => param !== '').join('&'); return queryString; }
    var landing_page = getUrlParam('landing_page');
    var aurl = document.getElementsByTagName('a'), ahf = aurl.length;
    var parameterMapping = { 'aff_click_id': 'aff_click_id', 'sub_aff_id': 'sub_aff_id', 'aff_sub1': 'aff_sub1', 'aff_sub2': 'aff_sub2', 'aff_sub3': 'aff_sub3', 'aff_sub4': 'aff_sub4', 'aff_sub5': 'aff_sub5', 'googleaid': 'googleaid', 'deviceid': 'deviceid', 'iosidfa': 'iosidfa', 'source': 'source' };
    var parameterString = '';
    if (Object.keys(parameterMapping).length > 0) { parameterString = createQueryString(parameterMapping); }
    while (ahf--) { if (parameterString) { aurl[ahf].setAttribute('href', `${landing_page}&${parameterString}`); } else { aurl[ahf].setAttribute('href', landing_page); } aurl[ahf].setAttribute('target', '_blank'); }
  </script>
```

***

### **Probando la Página Pre-landing**

Use el siguiente fragmento de código para probar el script de Pre-landing

```html
<!DOCTYPE html>
<html>
<head>
<title>Título de la Página</title>
</head>
<body>
  <a href=""> Enlace de Prueba 1</a>
  <a href=""> Enlace de Prueba 2</a>
  <a href=""> Enlace de Prueba 3</a>
</p>
  <script>
    function base64_decode(r) { if ("function" == typeof this.window.atob) return atob(r); var n, t, e, i, o, f, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", d = 0, h = 0, c = []; if (!r) return r; r += ""; do { n = (f = a.indexOf(r.charAt(d++)) << 18 | a.indexOf(r.charAt(d++)) << 12 | (i = a.indexOf(r.charAt(d++))) << 6 | (o = a.indexOf(r.charAt(d++)))) >> 16 & 255, t = f >> 8 & 255, e = 255 & f, c[h++] = 64 == i ? String.fromCharCode(n) : 64 == o ? String.fromCharCode(n, t) : String.fromCharCode(n, t, e) } while (d < r.length); return c.join("") }
    function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { vars[key] = value; }); return vars; }
    function getUrlParam(parameter) { var urlparameter = ''; if (window.location.href.indexOf(parameter) > -1) { urlparameter = getUrlVars()[parameter]; } return base64_decode(urlparameter); }
    function getQueryParam(param) { const urlParams = new URLSearchParams(window.location.search); return urlParams.get(param) ? urlParams.get(param) : ''; }
    function createQueryString(mapping) { let queryString = Object.keys(mapping).map(key => { let value = getQueryParam(key); return value ? `${mapping[key]}=${value}` : ''; }).filter(param => param !== '').join('&'); return queryString; }
    var landing_page = getUrlParam('landing_page');
    var aurl = document.getElementsByTagName('a'), ahf = aurl.length;
    var parameterMapping = { 'aff_click_id': 'aff_click_id', 'sub_aff_id': 'sub_aff_id', 'aff_sub1': 'aff_sub1', 'aff_sub2': 'aff_sub2', 'aff_sub3': 'aff_sub3', 'aff_sub4': 'aff_sub4', 'aff_sub5': 'aff_sub5', 'googleaid': 'googleaid', 'deviceid': 'deviceid', 'iosidfa': 'iosidfa', 'source': 'source' };
    var parameterString = '';
    if (Object.keys(parameterMapping).length > 0) { parameterString = createQueryString(parameterMapping); }
    while (ahf--) { if (parameterString) { aurl[ahf].setAttribute('href', `${landing_page}&${parameterString}`); } else { aurl[ahf].setAttribute('href', landing_page); } aurl[ahf].setAttribute('target', '_blank'); }
  </script>
  </body>
</html> 
```


---

# 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/pagina-de-pre-landing.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.
