Google Tag Manager: Configure to Prevent 431 Errors for UMN Website Visitors

This article is intended for UMN website and application administrators who have configured Google Analytics for their website or application. 

In this article:

Explanation of Google Analytics Default Cookie Behavior

Many UMN websites and applications use Google Analytics to monitor traffic and visitor behavior. By default, Google Analytics places its tracking cookies at the top-level domain: umn.edu. As UMN community members visit various UMN websites and applications over time, their web browser accumulates a plethora of Google tracking cookies attached to the umn.edu domain. The browser attempts to include these cookies in its requests to umn.edu websites and applications which can eventually exceed the header request size limit of the server they are trying to reach. This results in a 431: Request Header Fields Too Large error being displayed in the end user's web browser.  

You can do your part to prevent this issue for UMN faculty, staff, and students by configuring Google Tag Manager to set your Google Analytics tracking cookie on your site-specific subdomain.

Using Google Tag Manager to Configure your Google Analytics Cookies

You can use Google Tag Manager (GTM) to re-scope your Google Analytics cookies to your subdomain: my-site.umn.edu instead of umn.edu.

  • If you are using Google Analytics (but not GTM) with Drupal, follow the steps in the Linking your Google Analytics account to your Drupal Site section of Drupal: Configure Google Analytics for Your Site to add the cookie domain parameter directly in Drupal.
  • If you are using Google Analytics (but not GTM) with a non-Drupal application or CMS, the University Relations Measurement & Analytics team is available to help you get started with Google Tag Manager. Submit the University Relations project request form and select Measurement and Analytics from the dropdown as the applicable common goods service.

Once you have your Google Tag created in Google Tag Manager, proceed with the steps below to adjust your cookie domain:

  1. Log in to your GTM account and navigate to your Google Analytics Tag. The tag title naming convention may vary across units, but it should be a Google Tag that fires on either pageview or Initialize on pageview.
  2. Under Configuration Settings, select the Add A Parameter button. 
    • Two new fields will appear: Configuration Parameter on the right and Value on the left.
  3. In the Configuration Parameter field, type in cookie_domain. This is the Google parameter identifier.
  4. In the Value field, enter your primary website domain name - i.e. my-site.umn.edu
  5. Once you have entered the correct information, select Save.
  6. Use the button in the upper-right to Submit your changes and then Publish your GTM container.
  7. These changes may take up to 48 hours to propagate.

Additional Tracking Cookie Cleanup

Audit your existing tags to eliminate unneeded cookies such as:

  • Facebook pixels from old social media campaigns
  • Tags from Google Universal Analytics which has been retired

Refer to the University Relations blog post Optimizing cookie domains and cleaning Google Tag Manager for a streamlined umn.edu experience for additional information.

If you need further assistance with any of the above, please use the University Relations project request form and select Measurement and Analytics as the applicable common goods service.

Last modified

Changed

TDX ID

TDX ID
7565