Skip to content

Commit

Permalink
add Vercel Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
gh0stdotexe authored and gh0stdotexe committed Sep 12, 2023
1 parent 4361382 commit 089b41b
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,6 @@ const app = (
</React.StrictMode>
)

if (process.env.BUGSNAG_KEY) {
Bugsnag.start({
apiKey: process.env.BUGSNAG_KEY,
plugins: [new BugsnagPluginReact()],
enabledReleaseStages: ['production', 'staging'],
releaseStage: process.env.NODE_ENV
})

const ErrorBoundary = Bugsnag.getPlugin('react')
.createErrorBoundary(React)

ReactDOM.render(
<ErrorBoundary>
{app}
</ErrorBoundary>,
document.getElementById('root')
);
}else{
ReactDOM.render(
app,
document.getElementById('root')
);
}

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
import { inject } from '@vercel/analytics';

inject();

0 comments on commit 089b41b

Please sign in to comment.