MCPcopy Create free account
hub / github.com/DavidWells/analytics / App

Function App

examples/using-perfumejs/src/App.js:35–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33})
34
35export default function App() {
36 return (
37 <div className="App">
38 <ForkMe url='https://github.com/DavidWells/analytics/tree/master/examples/using-perfumejs' />
39 <h1>Using perfume.js with analytics</h1>
40 <p>Perfume is a tiny, web performance monitoring library that reports field data back to your favorite analytics tool.</p>
41 <p>Open the console to see perf metrics sending sent</p>
42 <a href="https://zizzamia.github.io/perfume/">Read more about perfume.js</a>
43 <br/><br/><br/>
44 <div>
45 <button onClick={() => analytics.track('buttonClicked', { color: 'blue' })}>
46 Track
47 </button>
48 <button onClick={() => analytics.identify('user-xyz')}>
49 Identify
50 </button>
51 <button onClick={() => analytics.page()}>
52 Page View
53 </button>
54 </div>
55 </div>
56 )
57}
58
59const ForkMe = ({ url }) => {
60 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected