They used your voting record (what party you were registered as), your online presence, your district(how it votes) and even your banking habits.
My state (GA) has open primaries. While your vote is secret, which ballot (Dem, Republican, Independent) you choose in the primary is not. This is valuable information, obviously.