A Personalization upload file includes two sections to describe its data: a header section and a data section.
Header section
The header for the upload file consists of two lines:
A pipe-delimited (
|
) list of the import element fields you want to use. There are 4 headers (marked as Required in the following table) which must be on the same line. The other headers aren’t mandatory and can be excluded if not needed.Note
The version header is now an optional line and will be ignored if not supplied.
Field name | Description | Data type | Required |
---|---|---|---|
| Event date and time in UTC | Date | No |
| Event name corresponding to the captured information. The event name
must be already created in Personalization (see note) (Example: | String | Yes |
| Source of the event (Example: | String | Yes |
| Visitor’s identity information (Example: | String | Yes |
| Type of visitor’s
identity information (Example: | Specific string ( | Yes |
| Visitor’s IP address (Example: | IPv4 address | No |
| Referrer’s URL (Example: | String | No |
| Internal identifier for the touch (Example: | String | No |
| Event’s URL (Example: | String | No |
| Visitor’s user agent (Example: | String | No |
| Number you have chosen to signify the importance of a visitor’s
interest in this event (Example: | Integer | No |
| customer site ID; must match to the external ID of an entry in the customer site table | String | No |
| The name of the goal reached | String | No |
| The value of the goal reached | Integer | No |
| Name of personalization associated with an event | String | No |
| Machine name of personalization associated with an event | String | No |
| The variation (decision) chosen for an event | String | No |
| The name of the audience | String | No |
| The decision policy used (Examples: | String | No |
You can also use the import file to enter information into user-defined fields,
where <i>
is the user-defined field you want to use, such as
touch_udf3
:
Field name | Description | Data type | Example |
---|---|---|---|
| User-defined field for a person; accepts up to 50 values (Optional) | String |
|
| User-defined field for a touch; accepts up to 20 values (Optional) | String |
|
| User-defined field for an event; accepts up to 50 values (Optional) | String |
|
You can use any ordering for your user-defined fields in the import file and can also omit unused user-defined fields.
You can use the file to import information into custom fields you have added to the Personalization service. Add each custom field’s name to the end of the pipe-delimited list.
Note
event_name - To import visitor information without associated events or touches, enter
updatePerson
for this field in the data section. When usingupdatePerson
, Personalization imports the following fields for the record:identity
,identity_source
, andperson_udf<i>
.If the actual data you are importing includes pipes, enclose the data in double quotes to avoid misinterpretation of column values. For example,
My company | a great company
is interpreted as two column values, and"My company | a great company"
is interpreted as a single column value. If the data you are importing already includes double quotes, add a second set of double quotes to each double quote. As an example, while"My company | a "great" company"
is interpreted as two column values,"My company | a ""great"" company"
is interpreted as one column value.
Example
The following example is the header section of an upload file with the
4 required import element fields and an optional field (in this example,
engagement_score
):
event_name|event_source|identity|identity_source|engagement_score
Data section
Enter each event you want to upload to Personalization on a separate line in the
file, with each of the event’s field separated by a pipe ( |
). The
event_name
, event_source
, identity
, and identity_source
fields
are required to be in the data section and must have associated values. The
identity_source
field must be a specific string as described in the
Header section section. Even though Personalization requires
three fields in the data section, you must include pipes to indicate the data
is null for unused core headers.
Upload file examples
The following page_example
upload file is the most basic upload file
template and has only the required data fields.
event_name|identity|identity_source|event_source
Content View|[email protected]|email|web
The following is an example of a more complete import file with more fields set. Blank lines are included for ease of reading. Providing more information for each field helps you to analyze events more comprehensively.
Event_name|event_date|event_source|identity|identity_source|url|referral_url|user_agent|ip_address|content_section|content_keywords
Content View|2014-08-27 11:25:00.155|web|[email protected]|email|http://www.example.com/page1|http://www.example.com/homepage|Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)|90.80.40.225|sport|soccer
Campaign Action|2014-08-27 11:25:00.162|web|My Name|name|http://www.example.com/page1|http://www.example.com/homepage|Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)|81.255.192.149||baseball
Content View||web|1565224|tracking|http://www.example.com/page1|http://www.example.com/homepage|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36|78.211.126.102|fashion||
Purging a person from the database
The File Import API includes a purgePerson
event type you can use to remove
a person from your database. For more information about how to use
purgePerson
, see Purging a person from the database.
Importing goal and decision events
The File Import API allows you to import goal and decision information into Personalization. For more information about how, see the Profiles API event_import documentation.