The Contact tab displayed in the Script Builder allows you to pass values collected from the web site into your Contacts database in Maropost Marketing Cloud.  The screen shows you the standard fields (email, first name, last name, phone, and fax) and each of the custom fields that you have created in your Contacts database.

As the examples indicate, you have the full range of Javascript to pass both static and dynamic values to each of the contact fields. You can even reference Javascript variables that have been defined in other places on the web page.

REMEMBER:  If you want the Maropost web tracking script to reference a variable that you’ve defined elsewhere on your web page, you’ll need to place the web tracking script in the web page below where you have defined the variable.

A special note about the email field

Normally you would not include this optional attribute because the contact’s ID is automatically read from the browser cookie that was set when the contact clicked through to the landing page from the email.  Even if you provide the email address, the tracking script will ignore it as long as the contact ID is present in the cookie.

This field is included to allow you to track the page views of a brand new contact. A typical scenario in which passing in the email address is appropriate is the one of a shopping cart process in which an anonymous site visitor enters an email address during the shopping process to receive the purchase confirmation email, and then checks the option to “also receive promotional emails.”  In this case, there will not be a contact ID set in the browser cookie so the email address becomes the lookup key.  If the email address exists, then the page view will be attributed to that contact.  If the email address does not exist, then a new contact record will be created and the page view attributed to the new contact.

contact_email

In this example above, there is a field in the web page whose ID is “myEmail”.  This line of Javascript instructs the web tracking script to accept the value of the “myEmail”field as the value for the email address of the contact.

The Contact tab also allows you to assign Contact Tags to any contact who has viewed each web page on the site.

contact_tag

 

In this example above, “myTag” is a Javascript variable that has already been defined and whose value has been set earlier up in the web page.  Note also that “Static Tag” is a static value for the Contact tag and it is defined with single quotes.  If a Contact tag added here to the web tracking script does not already exist in the Contact Tags library, one will be created.