1. A method to target an advertisement to a user, the method comprising: receiving a plurality of events, wherein an event comprises an instance of online activity between the user and at least one website; processing the events to determine content of each event; generating, by a computer, data comprising a plurality of input features by grouping the events into one or more clusters based on the content of each event, wherein each cluster corresponds to a unique input feature; generating at least one predictive model, based on a machine-learning model, to determine a likelihood of an input action by the user based on the clusters; and targeting the advertisement to the user based on the predictive model.