Event Collection for Custom Events
You can send custom events using the sendDeviceEvent function. Events are stored in a Big Data table in your D·engage account, which must be linked to the master_device table. If you provide a contact_key for the browser or device, the event will be associated with that specific user.
Note: Please check Event Collection/E-Commerce Events section to send specific e-commerce events to our platform. The example below sends a specific event to a specific custom big data table created on our platform (for instance for a specific need. Please note that D·engage platform is also a CDP!
dengage('sendDeviceEvent', tableName, dataObject, [callback]);
//for example if you have a table named "events"
//and events table has "key", "event_date", "event_name", "product_id" columns
//you just have to send the columns except "key" and "event_date", because those columns sent by the SDK
var eventData = {
event_name: 'purchase',
product_id: 12345,
};
dengage('sendDeviceEvent', 'events', eventData);