mirror of
https://github.com/vale981/Vulcan
synced 2025-03-07 02:21:43 -05:00
19 lines
479 B
JavaScript
19 lines
479 B
JavaScript
import { addTrackFunction } from 'meteor/vulcan:events';
|
|
import { newMutation } from 'meteor/vulcan:lib';
|
|
import Events from '../modules/collection';
|
|
|
|
async function trackInternalServer(eventName, eventProperties, currentUser) {
|
|
const document = {
|
|
name: eventName,
|
|
properties: eventProperties,
|
|
};
|
|
return await newMutation({
|
|
collection: Events,
|
|
document,
|
|
currentUser,
|
|
validate: false,
|
|
context: {},
|
|
});
|
|
}
|
|
|
|
addTrackFunction(trackInternalServer);
|