Data/Tracking

Follow and raise the first navigation page of your prospects in Webflow

outils :
Illustration croce

Table of contents

Video

1. Add the custom code to retrieve the 1st navigation page and store it in the session

Add this custom code in the head of each of your landing pages

 <script>
// Déclarer la variable firstPage pour les nouveaux utilisateurs et la stock dans la session
var firstPage;
if (!sessionStorage.getItem("firstPage")) {
  firstPage = window.location.pathname;
  sessionStorage.setItem("firstPage", firstPage);
} else {
  firstPage = sessionStorage.getItem("firstPage");
}
</script>

2. Add a field to your form to retrieve the stored value

Remember to put these fields on display: none, your prospects do not need to see them and this may degrade your conversion rate.

3. Add an ID to your form field

4. Add custom code to display the 1st page URL in your form field

Remember to put the value of the ID you entered earlier in place of “firstpage”

 <script>
// Récupérer l'élément HTML correspondant au champ de formulaire
var firstPageField = document.getElementById("firstpage");
// Modifier la valeur de l'élément HTML pour afficher firstPage
firstPageField.value = firstPage;
</script>

5. Publish your site and test the result

These tutorials might interest you

Our tutorials in the same category

See all our tutorials
Illustration traits
We use the best tools

Your site is developed using the best tools and best practices

Gemeos doesn't just offer you a website, but expertise in the best tools to guarantee you the best possible return on your investment.

Figma

To design your custom website and optimize its conversion rate

Webflow

For pixel-perfect, optimized integration of your website

Client-first

Organizing your project to perfection

Wized

To add advanced features to your project

Make

Automate your workflows and save maximum time