Personalization uses the updatePerson
API function to update
user-defined Person
attributes
without creating an Event record or
updating the Touch record. The API
function can be helpful when there is data from another source you want to
append to the person profile, such as firmographic or demographic data. You can
provide descriptive names for the attributes in Personalization Web, which are
then displayed in the visitor profile summary and the segment builder, using the Content metadata page.
Note
To capture visitor attributes with Google Tag Manager, see Capture visitor identity with Google Tag Manager.
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. You can define
up to 50 fields for values.
Personalization captures the fields and associates them with the website visitor’s information.
When using an attribute containing a date, the date must display in the following format:
yyyy-MM-dd'T'HH:mm:ss.SSS'Z
For example:
2015-03-25T00:00:00.000Z
The following example sets user-defined fields 5
, 6
, and 7
to firmographic values associated with the business 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>
Note
Public _tcaq
functions are only available after lift-capture.js
is
loaded on a page after personalization return. You will know
lift-capture.js
hasn’t loaded on a page if you receive the following
reference error:
ReferenceError: _tcaq is not defined