Methods
(static) withRGA4(props) → {function}
- Source:
Higher order component to initialized GA4, then automatically fire a page view event
Example
const Component = props => {
const rga4 = props.rga4
return (<div>{rga4.initialized}</div>)
}
export const RGA4Component = withRGA4(Component)
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
Object | Data for the page view event Properties
|
Returns:
- HOC Wrapper around the passed int component
- Type
- function