Knowledge Center

Knowledge Center > Insights > Developer Reference > Insights File Format Guidelines > User Attribute and User Metric Record Type Files

User Attribute and User Metric Record Type Files

When you send user data to Insights as part of a batch upload, you send the user attribute data, the user metric data, and the event data to Insights as separate files. These files are called record type files.

The following guidelines apply to user attribute record type files and user metric record type files:

  • Do not mix user attributes and user metrics in the same file
  • Include a header row with field labels
  • Include all required fields
  • Fields can appear in any order
  • Include one row per user
  • Use the same date for all rows; to send data for multiple dates, create a separate batch upload for each date

See Event Record Type Files for the expected format of record type files for event data.

Fields in User Attribute Record Type Files

Field Description

Date
(required)

The age of the data in the record type file. All rows should have the same date.

Format: ISO-8601 "standard" (YYYY-MM-DD)
Expected value: any date

External User ID
(required)

The external ID of the user. Must be unique in the record type file.

External Account ID
(required)

The external ID of the account.

Attributes

Fields containing attribute values for the user.

Format: Text, Numeric, Boolean, Date, or Datetime

You can mix attribute formats in the record type file.

When a user is included in the record type file, all attribute values included in the record type file are updated for the user. If an attribute value is null, the attribute for the user will be updated to null.

If a user is excluded in the record type file, none of the attribute values in the record type file are updated for the account. The user will retain values from the previous batch date.

Fields in User Metric Record Type Files

Field Description

Date
(required)

The age of the data in the record type file. All rows should have the same date.

Format: ISO-8601 "standard" (YYYY-MM-DD)
Expected value:

Metric Frequency Expected Date
Daily Every day
Weekly Monday for the start of the period. For example, for a weekly metric that aggregates from Monday 10/24/16 to Sunday 10/30/16, the expected value is 2016-10-24.
Monthly First day of the month. For example, for a monthly metric that aggregates from 10/1/2016 to 10/31/2016, the expected value is 2016-10-01.

Create a separate batch upload for each metric frequency. For example, when you need to send monthly metrics, do not mix the monthly metrics with the day's daily metrics. Create a separate batch upload with a user record type file containing the monthly metrics.

External User ID
(required)

The external ID of the user. Must be unique in the record type file.

External Account ID
(required)

The external ID of the account.

Metrics

Fields containing metric values for the user.

Format: Numeric

Examples

The following file illustrates how to prepare a record type file in CSV format. Replace the sample values before uploading the file to Insights.

Sample record type file containing user attribute data

To obtain a sample record type file containing user metric data, modify the sample record type file containing account metric data to include an External User ID field.

Last modified
17:01, 5 Jan 2017

Tags

This page has no custom tags.

Classifications

(not set)