Skip to main content
Solved

User segment from CSV

  • January 10, 2022
  • 3 replies
  • 829 views

Hi there,

 

I would like to create and save a user segment but it is composed of 670 different users (ie. distinct user_id).

Should I enter each of the 670 user_id manually in the interface or is there is a way to do a “bulk import” or create this segment automatically (eg CSV upload) ?
 

 

Thanks !

Best answer by Saish Redkar

Hey @Louisrbrt 

I’m not sure of what’s the limit in the number of values, but you can copy a list of comma-separated values to your clipboard and paste it into the search box for that property i.e User ID as demonstrated here to build your segment.

Currently a segment doesn’t support a csv upload, but you can build a behavioral cohort ( if you have access to it ) via a csv file of user ids and then use that cohort in your segmentation chart.

Hope this helps.

View original
Did this topic help you find an answer to your question?

3 replies

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1377 replies
  • Answer
  • January 10, 2022

Hey @Louisrbrt 

I’m not sure of what’s the limit in the number of values, but you can copy a list of comma-separated values to your clipboard and paste it into the search box for that property i.e User ID as demonstrated here to build your segment.

Currently a segment doesn’t support a csv upload, but you can build a behavioral cohort ( if you have access to it ) via a csv file of user ids and then use that cohort in your segmentation chart.

Hope this helps.


Daniel Foster

This was super helpful info. Thank you for sharing it. 

Could someone from Amplitude chime in to let us know whether there’s a limit on how many values can be pasted into this field? 

Also...here are a few tips I learned last week about pasting in values to define a segment:

  1. If your source data is in a column in Excel and you need to transform it into a comma-separated list, use CONCATENATE
  2. After pasting your values into the segment and selecting them all, hover over the input field and scan the tooltip to look for irregularities in the formatting of your values that could break the list (screenshot 1 below). Mine had some hard returns, for example, which munged all subsequent values in the list. 
  3. A way to double-check that all your values were correctly added: Select All values from the segment, copy them to your clipboard, paste into Excel, and choose Use Text Import Wizard (see screenshot 2 below) to split the values back out into columns, then count the columns to ensure the count matches the original count of values from your source file. 
  4. If you save your segment and edit it later...your edits will not be applied to any reports that use your saved segment. You will need to go into those reports, remove the segments, and re-add the saved segments to apply the most up-to-date segment definitions. 

Screenshot 1

 

Screenshot 2

 


Forum|alt.badge.img+1
  • Experienced
  • 13 replies
  • March 19, 2025

You can import a user segment from a CSV by creating a cohort in Amplitude. Go to the Cohorts section, upload your CSV with user identifiers, and save it. Once imported, you can use the cohort in your analyses just like any other segment.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings