#52 - Delayed Page Redirect v0.1

Redirect members to a new page with an optional delay.

View demo project
Voir la démo

<!-- 💙 MEMBERSCRIPT #52 v0.1 💙 DELAYED REDIRECT TO NEW PAGE -->
<script>
  const redirectToNewPage = function() {
    setTimeout(function() {
      window.location.href = "/your-page";
    }, 1000); // Delay in milliseconds
  };

  redirectToNewPage();
</script>

Création du scénario Make.com

1. Téléchargez le modèle JSON ci-dessous pour commencer.

2. Naviguez jusqu'à Make.com et créez un nouveau scénario...

3. Cliquez sur la petite boîte avec trois points, puis sur Import Blueprint...

4. Téléchargez votre fichier et voilà ! Vous êtes prêt à relier vos propres comptes.

Besoin d'aide avec ce MemberScript ?

All Memberstack customers can ask for assistance in the 2.0 Slack. Please note that these are not official features and support cannot be guaranteed.

Join the 2.0 Slack
Version notes
Attributs
Description
Attribut
Aucun élément n'a été trouvé.
Tutorial

This tutorial will guide you through adding a 1-second delay before redirecting the user to a new page. This can be useful in scenarios where you want to provide a brief message or notification to the user before they are redirected.

Step 1: Paste the Script

First, locate the global scripts section of your website, usually found before the closing `</body>` tag. Paste the script within that section:

Step 2: Customize the Redirect URL

In the script, locate the line `window.location.href = "/your-page";`. Replace `"/your-page"` with the desired URL of the page you want to redirect the user to. For example, if you want to redirect to a page called "/buy-credits", modify the line to `window.location.href = "/buy-credits";`.

Step 3: Adjust the Delay Duration (Optional)

By default, the script introduces a 1-second delay before the redirect. If you want to customize the delay duration, locate the line `}, 1000);` and modify the value `1000` (in milliseconds) to your desired time. For example, a delay of 4000 milliseconds equals 4 seconds.

Step 4: Save and Test

Save the changes to your website's code and test the functionality. When a user encounters this script, they will experience a 1-second delay before being automatically redirected to the specified page.