Information for: DEVELOPERS   PARTNERS

updatePerson - Acquia Lift JavaScript API

Acquia Lift uses the updatePerson API function to update user-defined Person attributes without creating an Event record or updating the Touch record. This can be helpful when there is data from another source that you want to append to the person profile, such as firmographic or demographic data. You can provide descriptive names for these attributes in Acquia Lift Web, which are then displayed in the visitor profile summary and the segment builder, using the Content metadata page.

Capturing person attributes

Add the following code to your webpage:

<script type="text/javascript">
_tcaq.push( ['updatePerson',
{'person_udf5':'attributedata1', 'person_udf6':'attributedata2', 'person_udf7': 'attributedata3' }
] );
</script>

where person_udf is a user-defined field for a person and attributedata is the information to add to the person. Up to 50 fields for values can be defined.

Acquia Lift captures the fields and associates them with the website visitor’s information.

When using an attribute that contains a date, the date must be in the following format:

yyyy-MM-dd'T'HH:mm:ss.SSS'Z

For example:

2015-03-25T00:00:00.000Z

Example usage

The following example sets user-defined fields 5, 6, and 7 to firmographic values associated with the business that the person works for - the company SMB, categorized as Retail, with 0-50 employees:

<script type="text/javascript">
_tcaq.push( ['updatePerson',
{'person_udf5':'SMB', 'person_udf6':'Retail', 'person_udf7': '0-50 employees' }
] );
</script>