6 min read

How to Monitor Bounce Rate in Google Analytics 4

Bounce rate in Google Analytics 4 works differently than Universal Analytics—it's now based on session engagement rather than a simple page-exit metric. If you're not seeing bounce rate data or want to monitor it programmatically across your tools, you need to know where to find it and how to query it via the API.

Find Bounce Rate in the GA4 Dashboard

The easiest way to start monitoring bounce rate is through GA4's default reports. Here's where to look and how to create a custom view for ongoing tracking.

Navigate to the Engagement Report

Open your GA4 property and go to Reports > Engagement > Pages and screens. You'll see a Bounce rate column by default. This metric shows the percentage of sessions that ended after a single pageview with no engagement event lasting at least 10 seconds.

javascript
// GA4 bounce rate is calculated as: (1 - engagement_rate)
// Sessions with engagement_time_msec >= 10000 are counted as engaged
// Your GA4 measurement ID in gtag.js
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXX'); // Replace with your GA4 measurement ID
GA4 bounce rate calculation and gtag.js setup

Create a Custom Dashboard Card

Click Dashboard in the left sidebar, create a new dashboard, and add a Scorecard widget. Set the metric to Bounce rate, optionally filter by Page path or Device category to track specific pages or devices. Save and check it daily for trends.

Add a Segment for Bounce Sessions

In Reports > Engagement, click Add filter and create a segment where Engagement duration is less than 10 seconds. This isolates sessions that GA4 counts as bounces, letting you compare behavior between engaged and bounced visitors.

Watch out: GA4 doesn't count a session as a bounce if the user triggers any event lasting at least 10 seconds, even without a click. Scrolling, video play, and form input all count as engagement.

Query Bounce Rate Programmatically with the Data API

If you need to pull bounce rate data into dashboards, alerts, or reporting tools, the Google Analytics Data API gives you programmatic access. You'll need a service account with access to your GA4 property.

Get Your Property ID and Service Account Credentials

Go to Admin > Property Settings and copy your Property ID (the number, not the measurement ID). Then create a service account in Google Cloud Console: APIs & Services > Credentials > Create Service Account. Grant it Viewer role on your GA4 property in Admin > Property Access Management.

Make a Request to the Google Analytics Data API

Use the Data API endpoint to query bounce rate by date, page, or dimension. The API returns metrics like bounceRate, sessions, and engagementRate. Filter by date range and dimensions to get the data you need.

javascript
const propertyId = 'YOUR_PROPERTY_ID';
const accessToken = 'YOUR_SERVICE_ACCOUNT_TOKEN';

const response = await fetch(
  `https://analyticsdata.googleapis.com/v1beta/properties/${propertyId}:runReport`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      dateRanges: [
        { startDate: '7daysAgo', endDate: 'today' }
      ],
      metrics: [
        { name: 'bounceRate' },
        { name: 'sessions' },
        { name: 'engagementRate' }
      ],
      dimensions: [
        { name: 'pagePath' },
        { name: 'deviceCategory' }
      ],
      limit: 100
    })
  }
);

const data = await response.json();
console.log('Bounce rate by page:', data.rows);
Query GA4 Data API for bounce rate metrics by page and device

Parse and Alert on Thresholds

Extract bounce rate from the API response and set up alerts. If a page's bounce rate exceeds 70%, log a warning or send a notification. This lets you catch problems before users abandon the page.

javascript
data.rows?.forEach(row => {
  const [pagePath, deviceCategory] = row.dimensionValues.map(v => v.value);
  const bounceRate = parseFloat(row.metricValues[0].value) * 100;
  
  if (bounceRate > 70) {
    console.warn(
      `High bounce rate on ${pagePath} (${deviceCategory}): ${bounceRate.toFixed(2)}%`
    );
    // Send to monitoring tool: Slack, email, or PagerDuty
  }
});
Parse API response and trigger alerts on high bounce rates
Tip: The Data API returns metrics as decimals (0.45 = 45%). Multiply by 100 to get percentages. Bounce rate is only calculated for sessions with pageviews; it will be 0 if no traffic occurred in your date range.

Track Engagement Manually with gtag Events

If GA4's automatic engagement detection isn't catching important interactions, manually track engagement events to influence bounce rate calculations.

Implement Engagement Tracking with gtag

Use gtag('event', 'engagement', {...}) to track user interactions explicitly. Pass engagement_time_msec with a value of at least 10,000 (10 seconds) to count a session as engaged and exclude it from bounce rate.

javascript
// Track meaningful user interactions as engagement events
function trackEngagement(eventName, duration = 10000) {
  gtag('event', 'engagement', {
    'event_category': 'interaction',
    'event_label': eventName,
    'engagement_time_msec': duration
  });
}

// Call when user scrolls past a threshold
window.addEventListener('scroll', () => {
  if (window.scrollY > 500) {
    trackEngagement('page_scroll_deep', 15000);
  }
});

// Call when user submits a form
document.querySelector('form')?.addEventListener('submit', () => {
  trackEngagement('form_submit', 12000);
});
Track user interactions as engagement events to reduce bounce rate

Monitor Real-Time Reports

Go to Reports > Realtime and filter by your custom events. Watch the Engaged sessions count grow as users trigger your engagement events. This validates that your tracking is working before bounce rate metrics update in your daily reports (which have a 24-48 hour delay).

Watch out: Firing engagement events for every interaction will skew your bounce rate. Only track meaningful interactions that indicate genuine interest—reading, scrolling past content, form input. Firing it on every click makes bounce rate meaningless.

Common Pitfalls

  • GA4 bounce rate includes sessions with zero events or events shorter than 10 seconds; verify your tracking code is firing properly or you'll see false bounces from legitimate traffic.
  • The Data API requires a service account with proper permissions—using a regular Google account token won't work. Confirm the service account is added to your GA4 property in Admin > Property Access Management.
  • Bounce rate is calculated per property and can't be filtered by destination URL in the UI—use the Data API with dimension filters if you need bounce rate broken down by specific pages.
  • Auto-tracking too many events or enabling bloated tracking libraries can slow your site and inflate engagement metrics artificially, making bounce rate untrustworthy for decision-making.

Wrapping Up

You now have three ways to monitor bounce rate in GA4: through the built-in dashboard for daily checks, the Data API for programmatic alerts and dashboards, and custom events for more control over what counts as engagement. Use the dashboard for quick monitoring, the API for automated alerts, and custom events to capture interactions GA4 might miss. If you want to consolidate bounce rate tracking across Google Analytics 4 and other analytics tools into one view, Product Analyst can help.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free