CSV Files as an External Data Source

You can import .csv files into Kissmetrics to import data into your account. We’ll accept both one-time uploads and a recurring import of .csv files from your Amazon S3 Bucket.

We recommend you read People, Events, and Properties and Common Methods before getting started here.

File Format

Columns will have the bold titles. These are the two required fields:

  • “Identity” (required): Each entry is a KM identity. We will accept both new identities and identities already in our database.
  • “Timestamp” (required, except when importing aliases): Each entry contains a timestamp of when the event/property occurred. The time format is in seconds as a UTC Unix epoch. If you are using dates in Excel, you may need to convert those dates to Unix timestamps. See this answer on Stack Overflow.

Then include at least one of these three columns, depending on what type of data you’re importing:

  • “Event” (optional): You can add an event name, such as Signed Up. It does not matter if you currently have data for this event, or if this is a completely new event. If you are importing events, each row needs an event. To set only properties, set those aside in a separate CSV file.
  • “Prop:”Property Name (optional): You can add property columns by giving them the title Prop: and then adding the property name. For example, Prop:Age or Prop:Billing Amount. You can include up to 10 property columns.
  • “Alias” (optional): in the rare case you are uploading aliases, you can add additional aliases to the KM identity.

Our CSV import is unable to accept double quotation marks (“) so please use single quotations (‘) if possible.


Importing only events (record command)

Identity Timestamp Event
bob@bob.com 1328044149 Subscribed
admin@bob.com 1327871425 Subscribed
matt@bob.com 1326664210 Joined Newsletter
joe@bob.com 1325974373 Joined Newsletter
phil@bob.com 1325629592 Subscribed

Importing events with optional properties (record command with properties)

Identity Timestamp Event Prop:Age Prop:Gender Prop:Favorite Food
bob@bob.com 1328044149 Subscribed 21 Male Pizza
admin@bob.com 1327871425 Subscribed 34 Female Sushi
matt@bob.com 1326664210 Joined Newsletter      
joe@bob.com 1325974373 Joined Newsletter     Tapas
phil@bob.com 1325629592 Subscribed 23 Male Apple Pie

Importing only properties (set command)

Identity Timestamp Prop:Email Address
bob@bob.com 1328044149 bob@bob.com
admin@bob.com 1327871425 admin@bob.com
matt@bob.com 1326664210 matt@bob.com
joe@bob.com 1325974373 joe@bob.com
phil@bob.com 1325629592 phil@bob.com

Importing optional aliases (alias command)

It’s uncommon to upload aliases, but this is the format if you absolutely needed to:

Identity Alias Timestamp
gwashdog gw@example.com 1230768000
abelincoln11 al@example.com 1230768000
mrtaft2 ht@example.com 1230768000

Sample .csv file

Attached is a sample .csv file for reference.

Is anything on this page unclear? Suggest edits on Github!