The visitor_info object is used to set information about a visitor. It can be specified in the settings initialization of the JS app (ConveadSettings) or passed over in the case of an event.

The visitor_info object contains a set of variables. Variables are divided into two types – standard and custom.

Custom fields are created in “My account” >Custom fields” and are used to transfer custom data. The name of the custom field variable corresponds to the name of the key specified when the field was created.

An example of the structure of the visitor_info object showing all the known variables:

<code>{ first_name: "John", // last_name: "Smith", // full_name: "John Smith", // email: "<a href="mailto:john_smith@example.com">john_smith@example.com</a>", // email phone: "8-800-000-000", // date_of_birth: "1974-07-30", // gender: "male", // "male" или "female" my_custom_numeric_property: 1234, // my_custom_string_property: "foo", // my_custom_date_property: "2014-04-20", // my_custom_boolean_property: "true" // }


If in your CMS the fields “name” and “surname” are not separated, then instead of first_name and last_name you need to enter the name in full_name. Convead will divide the name and surname automatically.


An example of a correct record of visitor_info when only the first name of the visitor is known:

<code>{ first_name: "John" }


An example of an incorrect record of visitor_info when only the first name of the visitor is known:

<code>{ first_name: "John", last_name: "", email: "" }


Transferring an empty string as a value should only be used to clear irrelevant information from Convead.

An example of the transmission of visitor_info when you initialize a JS application:

<code>window.ConveadSettings = { visitor_info: { first_name: "John" }, app_key: "xxxxxxxxx" }


An example of the transmission of visitor_info when sending an event:

<code>convead('event', 'update_info', {}, {first_name: "John"});


An example of the transmission of visitor_info in the URL API:

<code><a href="http://site.com/?convead%5Bevent%5D=update_info&convead%5Bvisitor_info%5D%5Bfirst_name%5D=John">http://site.com?convead[event]=update_info&convead[visitor_info][first_name]=John</a>
Did this answer your question?