Back

0% Statements 0/2
0% Branches 0/2
0% Functions 0/2
0% Lines 0/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                                             
import analytics from '@automattic/jetpack-analytics';
 
/**
 * Record a content guidelines Tracks event.
 *
 * @param {string} eventName  - Event name suffix (appended to `jetpack_ai_guidelines_`).
 * @param {Object} properties - Event properties.
 */
export function recordGuidelinesEvent( eventName, properties = {} ) {
	analytics.tracks.recordEvent( `jetpack_ai_guidelines_${ eventName }`, properties );
}
 
/**
 * Record a generic Jetpack AI Tracks event.
 * Use for shared events like `jetpack_ai_upgrade_button`.
 *
 * @param {string} eventName  - Full event name.
 * @param {Object} properties - Event properties.
 */
export function recordAiEvent( eventName, properties = {} ) {
	analytics.tracks.recordEvent( eventName, properties );
}