mirror of
https://github.com/vale981/Vulcan
synced 2025-03-12 13:36:37 -04:00
20 lines
479 B
JavaScript
20 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);
|