hotfix for chartbeat registering virtual pages
This commit is contained in:
parent
d902cb89e6
commit
82b389281d
2 changed files with 4 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ export default (authors: { name: string }[]) => {
|
|||
|
||||
export const registerPageview = () => {
|
||||
if (typeof window === 'undefined' || !window.pSUPERFLY) return;
|
||||
window.pSUPERFLY({
|
||||
window.pSUPERFLY.virtualPage({
|
||||
path: window.location.pathname,
|
||||
title: document?.title,
|
||||
});
|
||||
|
|
|
|||
4
src/globals.d.ts
vendored
4
src/globals.d.ts
vendored
|
|
@ -16,7 +16,9 @@ declare global {
|
|||
/** Chartbeat config */
|
||||
_sf_async_config: ChartbeatConfig,
|
||||
/** Chartbeat method */
|
||||
pSUPERFLY: (config: { path: string, title: string }) => void,
|
||||
pSUPERFLY: {
|
||||
virtualPage: (config: { path: string, title: string }) => void,
|
||||
},
|
||||
/** Graphics ads */
|
||||
graphicsAdQueue: any[],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue