landing page url in hidden field on CF7

lucfit 01 Apr, 2024
Hi, I have a website with some forms made with CF7 on different pages. Marketing campaigns point to a specific landing page. I would like to capture the parameter in the first landing URL (landing page) and store it in a hidden field of the form. Not the last visited URL of the site, but the first landing one. I tried creating a session in Js in my template (Helix) and then I tried to call the variable in a hidden field but without success. Any advice? Thanks!
Max_admin 12 Apr, 2024
Answer
there is only one landing page ? if this is true and it's a Chronoform then you can use {data:param_name} to get that, use this as the value of your hidden field
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lucfit 16 Apr, 2024
1 Likes
Hi Max_admin and thank you for your reply. No unfortunately I have many landing pages where people is free to navigate to other pages.

I managed to achieve the goal using two methods, which I'll explain hoping they can help someone with the same issue.

The first one involves a session (but this method often fails to get the referer):

The second method involves creating two forms:

Form 1) placed on the page load, published on all pages, which writes the visitor's IP address and the URL of origin onto a table on the site.

Form 2) published on the pages I want to track conversions for. Upon submission, it checks if the IP is already present. If so, it associates the visitor's details (name, surname, email, etc.) with the original landing IP and URL


Thank you
Max_admin 21 Apr, 2024

You made a good solution, a form on all pages where you store the variable to a session variable then do whatever with that variable when other forms are submitted, you can also write and read to a db table but that is slower of course

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.