How to CONVERT VARIABLES submitted in a FORM
To convert the data submitted by a lead on the conversion page so it is automatically filled in on a thank you page, follow the tutorial below.
Settings on the conversion page
- Open the page editor and click on "Editar" on the form;

- When you do that, the Configurar menu will open on the right side of the screen. In the "Link de redirecionamento" field, add the link of your thank you page to unlock the advanced form settings. Then click on "Configurações avançadas";

- After that, a box will open on the screen where you need to enable sending the form data in the redirect;

- Next, the form variable settings will open. In the fields where you enter the variables, they must be written without spaces or special characters, just like in the example below;

- Finally, click on "Salvar" and move on to the next configuration step. And don't forget to update your page, so that these changes are sent to the published page.
Settings on the thank you page
- Open the page editor and add to the page text (where you want the data conversion to happen) exactly the same variable you configured in the form on the conversion page.

- Then, click the gear icon in the top right corner of the screen;

- And click on "Javascript & CSS";

- Click to "Adicionar código";

- Then a box will open where you need to add the name of your code, select the "Funcionamento" option and add the entire code below to the "Código" field (just like in the example). This code is what makes the variable inserted on the page be replaced by the lead's data;
<script>
/* Função para pegar os parametros na url */
function URLToArray (url){
var request = {};
if(url.indexOf('?') !== -1){
var pairs = url.substring(url.indexOf('?') + 1).split('&');
for (var i = 0; i < pairs.length; i++) {
if (!pairs[i]) continue;
var pair = pairs[i].split('=');
request[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
}
}
return request;
}
/* Função para atualizar os dados em elementos */
function AtualizarInformacoes(limpar){
if(limpar == undefined){ limpar = false;}
var dados = Object.entries(URLToArray(window.location.href)), total_dados = 0;
if(dados.length == 0 || limpar){
dados = {'(.*?)':''};
dados = Object.entries(dados);
}
total_dados = dados.length;
if(total_dados){
var elementos = document.getElementsByClassName('gpc-e');
if(elementos){
var total = elementos.length;
for (var i = 0; i < total; i++) {
if(elementos[i].classList.contains('e_formulario')){
var campos = elementos[i].getElementsByTagName('INPUT'), total_campos = 0;
total_campos = campos.length;
if(campos.length){
for (var y = 0; y < total_campos; y++) {
var valor = campos[y].value;
if(valor){
for (var x = 0; x < total_dados; x++) {
var regex = new RegExp('{'+dados[x][0]+'}', 'gm');
valor = valor.replace(regex,dados[x][1]);
}
campos[y].value = valor;
}
}
}
var campos = elementos[i].querySelectorAll('.gpc_campos-titulo, .gpc_campos-texto'), total_campos = 0;
total_campos = campos.length;
if(campos.length){
for (var y = 0; y < total_campos; y++) {
var conteudo = campos[y].innerHTML;
if(conteudo){
for (var x = 0; x < total_dados; x++) {
var regex = new RegExp('{'+dados[x][0]+'}', 'gm');
conteudo = conteudo.replace(regex,dados[x][1]);
}
campos[y].innerHTML = conteudo;
}
}
}
} else if(elementos[i].classList.contains('e_faq')){
var campos = elementos[i].querySelectorAll('.gac-item_cabecalho_titulo, .gac-item_conteudo'), total_campos = 0;
total_campos = campos.length;
if(campos.length){
for (var y = 0; y < total_campos; y++) {
var conteudo = campos[y].innerHTML;
if(conteudo){
for (var x = 0; x < total_dados; x++) {
var regex = new RegExp('{'+dados[x][0]+'}', 'gm');
conteudo = conteudo.replace(regex,dados[x][1]);
}
campos[y].innerHTML = conteudo;
}
}
}
} else if(elementos[i].classList.contains('e_botao') || elementos[i].classList.contains('e_imagem') || elementos[i].classList.contains('e_icone') || elementos[i].classList.contains('e_texto') || elementos[i].classList.contains('e_titulo') || elementos[i].classList.contains('e_html')){
var conteudo = elementos[i].innerHTML;
for (var x = 0; x < total_dados; x++) {
var regex = new RegExp('{'+dados[x][0]+'}', 'gm');
conteudo = conteudo.replace(regex,dados[x][1]);
}
elementos[i].innerHTML = conteudo;
}
}
}
}
if(!limpar){AtualizarInformacoes(true); }
}
AtualizarInformacoes();
$('body').on('click','.link_popup',function(){ setTimeout(function(){ AtualizarInformacoes(); },100); });
</script>

- Finally, don't forget to "Atualizar" your page so that the changes are sent to the published page.

Did you like this article? If you need any help, reach out to our support team. We're always happy to help!
Updated on: 08/01/2026
Thank you!
