CrowdPower
  • 👋Introduction
  • ✅Getting Started
    • The Basics
    • JavaScript Tag
      • Identify Customer
      • Create Customer Event
      • Create Customer Charge
      • Create Customer Tag
      • Create Page View
      • Prompt for Push
    • Beacon API
      • Identify Customer
      • Create Customer Event
      • Create Customer Charge
      • Create Customer Tag
      • Track
    • Importing Customers
    • Basic Email Setup
    • Advanced Email Setup
  • 📚Resources
    • Smart Sending
    • Working with Sessions
    • Working with Traits
    • Working with Phone Numbers
    • Personalizing Messages
    • Push Notifications
    • Unsubscribe Groups
  • 🔌Integrations
    • Discord
    • Slack
    • Stripe
    • Zapier
  • REST API
  • Console
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. JavaScript Tag

Create Customer Event

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

PreviousIdentify CustomerNextCreate Customer Charge

Last updated 2 years ago

Was this helpful?

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

✅
Events