Objective
Following these steps will reduce the cookie data that gets passed to msu.edu and prevent recurring 400 Bad Request errors on the affected site.
Environment
MSU.edu Websites
Before You Begin
There are two ways to resolve this issue:
Steps
- Remove unused site trackers such as Hotjar and Clarity.
- For sites that use Google Tag Manager. Default uses parent “msu.edu” as the domain, instead of your domain.
- For GTM users, go to Tag Configuration from the dashboard.
- Find or add “cookie_domain” parameter.Value = [your web domain]
- For sites that use gtag.js
- Add the cookie_domain attribute seen in the screenshot above
- Example: gtag('config', 'GA_TRACKING_ID', {'cookie_domain': 'YOUR_DOMAIN'});
- For sites that use analytics.js
- You should upgrade your script as it is using the older UA JS.Then follow the gtag.js directions.
- Test the domain is set correctly using a plugin tool, such as EditThisCookie
Additional Info
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error.