in src/plugins/event-plugins/PageViewPlugin.ts [98:117]
private createIdForCurrentPage(): string {
const path = window.location.pathname;
const hash = window.location.hash;
switch (this.context.config.pageIdFormat) {
case PAGE_ID_FORMAT.PATH_AND_HASH:
if (path && hash) {
return path + hash;
} else if (path) {
return path;
} else if (hash) {
return hash;
}
return '';
case PAGE_ID_FORMAT.HASH:
return hash ? hash : '';
case PAGE_ID_FORMAT.PATH:
default:
return path ? path : '';
}
}