Context

Methods

(inner) RGA4Provider(props) → {Component|Object}

Source:

Context Provider used to set the Goggle Analytics Context.

Example
const App = () => {
  return (
    <RGA4Provider
      code={'Measurement-ID'}
      config={{ debug: true }}
    >
       <App />
    </RGA4Provider>
  )
}

export default App
Parameters:
Name Type Description
props Object

RGA4 provider props

Properties
Name Type Attributes Description
children *

React Child components to wrap the with theme provider

code string

Google Analytics measurement ID to use for tracking

config Object <optional>

Custom Google Analytics config

gaCodes Array.<String> <optional>

Extra google analytics

Returns:
  • RGA4Provider.Provider - Provides RGA4 Singleton to the consumer
Type
Component | Object