Create Customer Event

Creates a new project event, if one does not exist, and a new event for the customer’s timeline.

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.

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

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 section to be displayed to you as a string, boolean, or date.

Last updated