Guía de instalación de scripts de seguimiento
Instalar scripts de seguimiento en su sitio web
Esta documentación le permite etiquetar su sitio web para identificar los clics y las conversiones de sus socios afiliados.
Primero, si usted ejecuta las siguientes soluciones de CMS, por favor use nuestros plugins:
Por otro lado, si está ejecutando una solución personalizada, por favor siga estos dos pasos:
If you use redirect tracking links, go to the step 2.
1. Agregar un script de seguimiento de clics en todas las páginas o páginas de destino
Este Javascript, que debe ser incrustado en todas las páginas del sitio web del anunciante (o páginas de destino), detecta los clics de los sitios web de los afiliados, para activar la tecnología de seguimiento y para proteger al anunciante del fraude de clics.
[pastacode lang=»javascript» manual=»%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20%20var%20_ae%20%3D%20%7B%0A%20%20%20%20’pid’%3A%20’YOUR%20PROGRAM%20ID’%2C%0A%20%20%20%20’advertiserFirst’%3A%2021600%2C%20%2F%2F%2015%20days%20in%20mins%0A%20%20%20%20’allowSiteUnder’%3A%20false%2C%0A%20%20%20%20’allowIframing’%3A%20false%2C%0A%20%20%20%20’host’%3A%20’https%3A%2F%2Flb.affilae.staging1.kaizen-developments.com’%0A%20%20%7D%3B%0A%20%0A%20%20(function()%20%7B%0A%20%20%20%20var%20element%20%3D%20document.createElement(‘script’)%3B%20element.type%20%3D%20’text%2Fjavascript’%3B%20element.async%20%3D%20true%3B%0A%20%20%20%20element.src%20%3D%20’%2F%2Fstatic.affilae.staging1.kaizen-developments.com%2Fae-v3.2.js’%3B%0A%20%20%20%20var%20scr%20%3D%20document.getElementsByTagName(‘script’)%5B0%5D%3B%20scr.parentNode.insertBefore(element%2C%20scr)%3B%0A%20%20%7D)()%3B%0A%3C%2Fscript%3E» message=»» highlight=»» provider=»manual»/]
Estas variables son personalizables:
| Variable | Required? | Description | Values |
|---|---|---|---|
pid |
Required | Unique id for your affiliate program. | This value is generated automatically and available on your program’s configuration page. |
advertiserFirst |
Optional | The number of minutes elapsed from the first visit to the advertiser’s site which will be counted as being a part of the conversion process if «Split commission» sharing mode is active. | Default value must be a whole number. Default: 21600 (15mins). |
allowSiteUnder |
Optional | Allows or disallows affiliate tracking if the advertiser’s web site was automatically opened through a hidden pop-up. | This value must be true or false.Default: false. |
allowIframing |
Optional | Allows or prevents the advertiser’s web site from being loaded through an HTML iframe embedded on another site. | This value must be true or false.Default: false. |
forceReferer |
Optional | Affiliate clicks must originate from a web site. Set this parameter to true in order to prevent affiliates from generating affiliate clicks through emailings. |
This value must be true or false.Default: false. |
host |
Optional | Only available if you have custom SSL domain name options activated for your plan. Hostname address of the server which will receive the tracking of affiliate clicks. | URL |
customVar |
Optional | Allows you to include a custom variable in the tracking code (used for cross-selling, cashbacks, etc…). | Character string «URL encoded» |
cookieNameForAdvertiserFirst |
Optional | Cookie name to allow the detection of whether a visitor has already been to the advertiser’s site before having clicked on an affiliate link. | String of characters without spaces or special characters [a-zA-Z0-9]. Default: AeFirst |
referrer |
Optional | Allows you to manually specify the URL of the referring web site to be associated with the tracking. | URL Default: document.referrer |
2. Añade una etiqueta de conversión en tu página de «gracias» (ventas o clientes potenciales)
La etiqueta de conversión desencadena una comunicación con un servidor Affilae para informarle de que se ha generado una nueva conversión.
El servidor es entonces capaz de detectar si un usuario ha sido parte de un proceso de seguimiento de afiliados o no y, si es así, registrar una nueva conversión.
Las etiquetas de conversión deben estar incrustadas en las páginas de confirmación de conversión de su sitio web: páginas de confirmación de pedido / páginas de agradecimiento…
Ejemplo:
[pastacode lang=»markup» manual=»%3Ciframe%20src%3D%22https%3A%2F%2Flb.affilae.staging1.kaizen-developments.com%2F%3Fkey%3D%7BKEY%7D%26id%3D%7BUNIQUE_ID%7D%26amount%3D%7BAMOUNT%7D%26payment%3D%7BPAYMENT%7D%26customer%3D%7BCUSTOMER_ID%7D%26cv%3D%7BCUSTOM_VAR%7D%26voucher%3D%7BVOUCHER_CODE%7D%22%20frameborder%3D%220%22%20width%3D%221%22%20height%3D%221%22%3E%3C%2Fiframe%3E» message=»» highlight=»» provider=»manual»/]
Estas variables son personalizables:
| Required parameters | Instructions |
|---|---|
| KEY | This key is supplied to you on the «conversion code» page available through your affiliate program Configuration dashboard. |
| UNIQUE_ID | Populate this parameter with a unique identifier, for example a unique order number.
If you use this code to confirm a subscription to a newsletter yet you do not have an automatically generated unique identifier, you can for example use a user’s email address to populate this parameter. |
| AMOUNT | Total amount Excluding Tax of an order, which will serve as the basis for calculating the commission and Revenue generated. |
| PAYMENT | If the conversions are subject to payment, specify the client’s mode of payment, if not simply leave this parameter blank:
|
| CUSTOMER_ID | Your client identifier if the «Revenue Share» option is activated. Please use an identifier that will not change over time, the best being the ID number used in your database.
Leave this parameter blank if you do not use the Revenue Share option. |
| CUSTOM_VAR | Optional: custom variable that will be available in the interface and API: products, new customer etc. |
| VOUCHER_CODE | Optional: Should be replaced by the oucher code that was applied during check-out process. |
¿Necesitas más información? Contáctenos.




