1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-23 19:02:29 +03:00
Ghost/ghost/member-events/lib/MemberSignupEvent.js
Fabien O'Carroll 9fca7ce8f3 Added missing events for analytics
refs https://github.com/TryGhost/Team/issues/1054

In order to listen to events we must define them! This adds the missing
events that we need to listen to for member analytics.
2021-09-21 18:39:17 +02:00

27 lines
576 B
JavaScript

/**
* @typedef {object} MemberSignupEventData
* @prop {string} memberId
* @prop {string} entryId
* @prop {string} sourceUrl
*/
module.exports = class MemberSignupEvent {
/**
* @param {MemberSignupEventData} data
* @param {Date} timestamp
*/
constructor(data, timestamp) {
this.data = data;
this.timestamp = timestamp;
}
/**
* @param {MemberSignupEventData} data
* @param {Date} [timestamp]
*/
static create(data, timestamp) {
return new MemberSignupEvent(data, timestamp || new Date);
}
};