Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
react-metrics-service
Advanced tools
React adapter for metrics services like Google Analytics, Tealium or Comcast.
React adapter for metrics services like Google Analytics, Tealium or Comcast.
WIP
First create your metrics-service module (eg. using google analytics) in the file my-metrics.js
:
// my-metrics.js
import { createClient, googleAnalytics } from 'react-metrics-service'
const client = createClient()
client.addDispatcher(googleAnalytics({ trackingID: 'UA-000000-01' }))
export default client
Add metricsServiceContext
high order component to your app root component:
import { metricsServiceContext } from 'react-metrics-service'
import myClient from 'my-metrics'
const App = (
// ... your app here
)
export default metricsServiceContext({ client: myClient })(App)
Then you can use one of the helper high order components like:
import { metricsServiceClick } from 'react-metrics-service'
import MyComponent from 'my-component.js'
export default metricsServiceClick('gaSend', 'event', 'Video', 'play')(MyComponent)
Or use the service directly like:
import myClient from 'my-metrics'
export default () => {
// ...
myClient.gaSend('event', 'Video', 'play')
// ...
}
First of all, thank you for wanting to help!
git checkout -b more_magic
npm test
git commit -am "Added more magic"
git push origin more_magic
FAQs
React adapter for metrics services like Google Analytics, Tealium or Comcast.
The npm package react-metrics-service receives a total of 2 weekly downloads. As such, react-metrics-service popularity was classified as not popular.
We found that react-metrics-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.