Skip to main content

Monitoring & Analytics

Track performance, usage, and errors for your Firebase Hosting sites.

Firebase Console Monitoring​

  • Usage & Billing: Track bandwidth and storage
  • Performance: View CDN performance metrics
  • Errors: Monitor 4xx and 5xx responses

Google Analytics Integration​

<!-- Global site tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
</script>

Performance Monitoring​

import { initializeApp } from 'firebase/app';
import { getPerformance } from 'firebase/performance';

const app = initializeApp(firebaseConfig);
const perf = getPerformance(app);

Coming Soon​

This documentation is being expanded. For now, please refer to: