File size: 555 Bytes
1e92f2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | const SITE_FRAGMENT_REGEX = /\/(email|mailboxes|checkout|domains|purchases|plans|view)(\/)*/i;
/**
* Check if a path should report the current selected site's main product (`site`, `domain` or `email`)
*
* Some paths should not report it because it's used for creating funnels to study
* only email and purchase activities.
* @param {string} path The tracked path.
* @returns {boolean} If the report should null `site_main_product`.
*/
export default ( path ) => {
if ( ! path ) {
return true;
}
return ! SITE_FRAGMENT_REGEX.test( path );
};
|