File

/home/workflows/workspace/libs/common/analytics/events/src/lib/events/page-view.ts

Description

Page view properties Provided by analytics

Index

Properties

Properties

hash
hash: string
Type : string

Current hash

height
height: number
Type : number

Viewport height at time of event

path
path: string
Type : string

Current path

referrer
referrer: string
Type : string
Optional

Referrer page

search
search: string
Type : string

Current search (query parameters)

title
title: string
Type : string

Page title

url
url: string
Type : string

Page origin

width
width: number
Type : number

Viewport width at time of event

import { createEvent, EventCategory } from '../event';

/**
 * Page view properties
 * Provided by [`analytics`](https://github.com/DavidWells/analytics/blob/analytics%400.8.19/packages/analytics-core/src/modules/page.js#L54)
 */
export interface PageViewEventProps {
  /** Page title */
  title: string;
  /** Page origin */
  url: string;
  /** Current path */
  path: string;
  /** Current hash */
  hash: string;
  /** Current search (query parameters) */
  search: string;
  /** Viewport width at time of event */
  width: number;
  /** Viewport height at time of event */
  height: number;
  /** Referrer page */
  referrer?: string;
}

/** Page view event */
export default createEvent<PageViewEventProps>('pageView', EventCategory.Statistics);

results matching ""

    No results matching ""