This article explains how to capture a customers sign-up date, by adding additional code to Revinate’s generated code or the existing code of your website sign-up form.
Click on Guest segments and then Contact lists.
Select your sign up form from the list in this example the list is Sign up form
Click the “UPLOAD VIA API” button
Click the “ADD NEW PROFILE FIELD” below the form fields list
Name your new profile field and check the “This is a date field”
Our minimum recommendation is to include first name, last name, and email address, along with your new profile filed when configuring the code.
On the back end of your website the input tag shared below is inserted within the form section.
<input type="hidden" name="#" id="signup_date" value="">
The '#' value will be replaced with the name value generated for the specific new profile field created. For example if I name the new profile field 'Website Signup Date', the name value in Revinate becomes 'WEBSITESIGNUPDATE' and the input tag would look like the below.
<input type="hidden" name="WEBSITESIGNUPDATE" id="signup_date" value="">
Lastly, the script section shared below is inserted at the end of the body section.
<script>
var dateField = document.getElementById("signup_date");
var currentDate = new Date().toISOString().slice(0, 10);
dateField.value = currentDate;
</script>
Now when a user submits the website sign-up form, the sign-up date should be included.