# Create Customer Event

When a customer performs an action on your website, you should call the `event` method. This will add a new event in your project the first time it is called, and add a new event in the customer’s timeline on their CrowdPower profile. You can pass along key/value pairs (properties) to go along with the event. These properties should relate to the action the customer just performed. For example, if the customer purchased a plan, the action may be called *Purchased Plan*, and a property may be called *plan\_name*.

```javascript
<script>
  window.cp('event', {
    'action': '<action>',
    'properties': {
      '<key>': '<value>', // Optional properties
    }
  });
</script>
```

{% hint style="info" %}
The preferred method for sending in properties is to use snake\_case for keys, and UNIX timestamps (in seconds) for date values.

Properties can be formatted in the [Events](https://app.crowdpower.io/events) section to be displayed to you as a string, boolean, or date.
{% endhint %}
