Skip to content

rhdeck/usegtm

Repository files navigation

useGTM

React implementation for Google Tag Manager

usegtm - v1.0.0

usegtm - v1.0.0

Table of contents

Functions

Functions

GTM

GTM(options: GTMArgs & { children?: ReactNode ; events?: GTMEvents }): Element

Parameters:

Name Type
options GTMArgs & { children?: ReactNode ; events?: GTMEvents }

Returns: Element

Defined in: index.tsx:79


useGTM

useGTM(options: Partial<GTMArgs> & { events?: GTMEvents }): object

Parameters:

Name Type
options Partial<GTMArgs> & { events?: GTMEvents }

Returns: object

Name Type
auth? string
dataLayerName string
events? GTMEvents
id string
preview? boolean
sendEvent (key: string, value: string) => void
sendEvents (events: GTMEvents) => void

Defined in: index.tsx:92

About

Google Tag Manager Integration for React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published