[UA] Session and campaign timeout handling

Set how long sessions and campaigns can last.
This Universal Analytics feature is only available for websites using gtag.js or analytics.js. Using ga.js (Classic Analytics) will stop Referral Exclusions from working.

Sessions and campaigns end after a specific amount of time passes. By default, sessions end after 30 minutes of inactivity and campaigns end after six months. You can change the settings so sessions and campaigns end after the specified amount of time has passed.

The length of a session and campaign depends on your site and business. Here are a few ideas to get you started thinking about session and campaign timeouts:

  • If your site automatically signs a user out after being inactive for a certain amount of time, set the session timeout to match that length of time.
  • Lengthen the session time if you have a lot of content and expect users to take a long time engaging with that content. Conversely, shorten the session time if the site has a small amount of content.
  • Set the campaign timeout handling to the same amount of time the campaign is going to run or expected to be relevant. Clicks to a social media micro-campaign might not be relevant for more than a few days after launch.

Campaign timeout cannot be greater than two years. Sessions cannot be less than one minute or greater than four hours.

Change session and campaign timeout settings

These settings are applied in the admin settings of each property in your account. To change these settings:

  1. Navigate to a property. If you're not in the settings menu, click Admin. Select the account and property you want to edit.
  2. From the property column, click Tracking Info then Session Settings.
  3. Under Timeout Handling, use the controls to set Session timeout and Campaign timeout.
  4. Click Apply.

Learn more about setting session timeout and campaign timeout in your tracking code.

Was this helpful?

How can we improve it?
true
Choose your own learning path

Check out google.com/analytics/learn, a new resource to help you get the most out of Google Analytics 4. The new website includes videos, articles, and guided flows, and provides links to the Google Analytics Discord, Blog, YouTube channel, and GitHub repository.

Start learning today!

Search
Clear search
Close search
Google apps
Main menu
9318512501321041266
true
Search Help Center
true
true
true
true
true
69256
false
false