Name and Phone Number Tracking with the Universal Script

Hyros will automatically track data in any field with the back end Label of “Name”, “First Name”, “Last Name” or “Full Name” however, these labels are not present in every scenario and because of this Hyros will not pick up data from fields with labels having any different characters (such as “State Name”, “Country Name” etc. ) since that would open the door to the possibility of tracking names that aren’t actually names.

For specific cases please follow the steps listed below to manually add the Hyros class to the desired name field for extra name tracking accuracy.

It is possible to track names with our Universal Script which is beneficial to send more conversion data and through it increase the “matching quality” of events inside Ad platforms.

To successfully track names with the universal tracking code it is required to edit the Name field code in our forms manually to include the Hyros class hyros-first-name, hyros-last-name, hyros-full-name respectively, this way the Universal Code will identify the field classes and use them to track the Lead’s name.

For our sample scenario the user has a form with the following HTML code:

<form action=”/action_page.php”>
<label for=”fname”>First name:</label>
<input type=”text” id=”fname” name=”fname”>
<label for=”lname”>Last name:</label>
<input type=”text” id=”lname” name=”lname”>
<input type=”submit” value=”Submit”>
</form>

After editing the fields, the code should look like this:

<form action=”/action_page.php”>
<label for=”fname”>First name:</label>
<input type=”text” id=”fname” class="hyros-first-name" name=”fname”>
<label for=”lname”>Last name:</label>
<input type=”text” id=”lname” class="hyros-last-name" name=”lname”>
<input type=”submit” value=”Submit”>
</form>


OR
<form action=”/action_page.php”>
<label for=”full_name”>Full name:</label>
<input type=”text” id=”full_lname” class="hyros-full-name" name=”full_name”>
<input type=”submit” value=”Submit”>
</form>

By doing this Hyros’ Universal code will identify the fields and assign the data to the Lead.

Using the same principle we can add a similar script line to track phone numbers as well:

<label for=”hyros-phone”>Phone number: </label>
<input type=”text” id=”hyros-phone” class="hyros-phone" name=”hyros-phone”>

After adding this line the code should look like something similar to this:

<form action=”/action_page.php”>
<label for=”fname”>First name:</label>
<input type=”text” id=”fname” class="hyros-first-name" name=”fname”>
<label for=”lname”>Last name:</label>
<input type=”text” id=”lname” class="hyros-last-name" name=”lname”>
<label for=”hyros-phone”>Phone number: </label>

<input type=”text” id=”hyros-phone” class="hyros-phone" name=”hyros-phone”>
<input type=”submit” value=”Submit”>
</form>

Name matching does not really affect tracking or its accuracy but can help us optimize ads to increase results. Specific customer information can be sent along with our optimization events which can help attribute more conversions to the right sources and reach more potential (high quality) leads.

The main goal is to improve the number of conversions being attributed as well as your potential reach/audience size while at the same time the cost per conversion decreases.

Example

How to identify each field in the HTML code?

To identify the code associated with each field (first/last name, full name, phone number, etc.) right click anywhere on the page and then click Inspect.

Once the HTML code window is open as in the image below, click on Selector (step 1), then select the field you want to identify (step 2), and the code associated with the field you selected will appear on the right(step 3).

How to update the HTML code?

For each one it is different how to access the HTML code, but in principle we need to access the part of the code we have identified above and make the necessary updates. In our example, we will update the First Name field and, according to our documentation, we need to add this class="hyros-first-name".

The code we identified above is this one below:

The updated code containing this class, class="hyros-first-name", looks like this:

Track First and/or Last name data from URL (Alternative Method)

In case we do not want to edit classes in our our universal script, we can also capture the first and last name data from the URL. To do this we just need to make sure we are sending the right details to the URL with the appropriate labels.

Our goal is for the resulting URL to look similar to the one below:

E.g. http://www.yourthankyoupage.com/?first-name=John

For reference, here’s the list of variants Hyros recognizes for First and Last name tracking.



Please contact your Onboarding Analyst if you have any questions regarding this process.