Events
Event is the way to send arbitrary information to erxes then you can create segments based those information
#
Registering eventsEvents are actions that are triggered by something your customer performs on your site or app. Every time the event occurs, a new record is created in the analytics database. Refer to the following instruction to create event-based segments.
#
Step 1: Copy the scriptCopy the code below and paste it onto your website page body section.
Replace http://localhost:3200
with your erxes domain
#
Update customer properties.There are 2 ways to determine customer
- To use messenger script Messenger script will create and cache customer then events will use that customer as a action owner
- To use window.Erxes.identifyCustomer function
It must receive one of following paramaters
window.Erxes.identifyCustomer({ email: 'email', phone: 098333, code: 'code; })
Let's use messenger script. Updated script section must look like following
Now let's add following code to the body section
Let's check the updates
We have custom properties with codes custom-prop1, custom-prop2. To update the custom properties value we passed properties names with the prefix custom_field__
If field name is not basic field or not custom property then it will be registered as tracked data.