Articles on: Page Editor

How to create a random REDIRECT to WHATSAPP GROUPS

To install the random code to redirect to WhatsApp groups, follow the tutorial below:


  1. Create a new page that will contain only a message letting the visitor know they will be redirected to a WhatsApp group (e.g.: Please wait, you are being redirected to a WhatsApp group...);
  2. After creating the visual part of the page, click the gear icon in the upper right corner of the page editor;



  1. Go to "Javascript & CSS";



  1. Click "Add code", add a name for your code, select the code type as "Functionality" and add the code below in the text field:


<script>
var urls = new Array();
urls[0] = "https://link1.com/";
urls[1] = "https://link2.com/";
urls[2] = "https://link3.com/";
urls[3] = "https://link4.com/";
var random = Math.floor(Math.random()\*urls.length);
window.location = urls[random];
</script>



  1. The only change you will need to make to this code is in the URLs.


Where it says https://link1.com/, https://link2.com/ and so on, you will need to replace them with your group links.



A practical example would look like the code below once installed.


<script>
var urls = new Array();
urls[0] = "https://grupo1.com/";
urls[1] = "https://grupo2.com/";
var random = Math.floor(Math.random()\*urls.length);
window.location = urls[random];
</script>


  1. Click "Add"!
  2. After finishing the code installation, publish this redirect page.


If you don't know how to publish a page, see this tutorial -> https://ajuda.greatsoftwares.com.br/pt-br/article/como-publicar-uma-pagina-11vhkbn/


  1. After publishing, copy the URL of the published page and add it to your form's redirect link.


If you don't know how to do it, follow this tutorial -> https://ajuda.greatsoftwares.com.br/pt-br/article/como-redirecionar-um-lead-apos-o-envio-do-formulario-1d24y0d/


All set! After that, your random redirect to WhatsApp groups will be ready.


We hope this helped! If you have any questions, get in touch with our team.

Updated on: 08/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!