If you use Analytics Insights WordPress plugin to monitor website performance and you have an issue where your report resets to Realtime on login, instead of remembering your previous report, follow this tutorial to fix the issue.
Analytics Insights relies on cookies to save your preferences, including aiwp_wg_default_metric
, aiwp_wg_default_dimension
, and aiwp_wg_default_swmetric
, which are used to remember the last report for the next login. If these cookies are missing or corrupted, the report resets to the default state.
This tutorial will guide you through debugging and clearing these cookies to restore proper functionality.
Why Analytics Insights Relies on Cookies
Cookies are essential for storing temporary user data, such as report settings or preferences. In Analytics Insights, the following cookies are used:
- aiwp_wg_
default_metric
: Saves your preferred metric (e.g., page views or bounce rate) - aiwp_wg_
default_dimension
: Tracks the chosen dimension for data analysis (e.g., location or traffic source) - aiwp_wg_
default_swmetric
: Stores additional metrics related to your dashboard setup
When these cookies are missing, outdated, or blocked, the system defaults to showing the Realtime report.
Step-by-Step Guide to Debug and Clear Cookies
Here’s how you can check, debug issues and reset cookies for Analytics Insights plugin:
Inspect Your Cookies
To check if these cookies exist and are functioning:
- Open Developer Tools: Press
F12
(orCtrl + Shift + I
on Windows,Cmd + Option + I
on Mac). - Locate Cookies: Go to the Application tab, then expand Cookies in the left-hand menu and select your website’s domain.
- Verify Cookie Values: Look for the cookies named
aiwp_wg_default_metric
,aiwp_wg_default_dimension
, andaiwp_wg_default_swmetric
. Ensure they have valid values corresponding to your preferences.
Debugging Cookie Issues
The main causes of missing cookies or cookies having unexpected content are:
- Blocked Cookies: Ensure your browser allows cookies for your domain.
- Corrupted Cookies: If the values seem incorrect, they may have been corrupted due to system errors.
Clear and Reset Cookies
- Delete Specific Cookies:
- Right-click on each of the cookies (
aiwp_wg_default_metric
,aiwp_wg_default_dimension
,aiwp_wg_default_swmetric
) and select Delete.
- Right-click on each of the cookies (
- Clear All Cookies for Analytics Insights:
- Go to your browser settings.
- Navigate to Privacy and Security > Cookies and Site Data.
- Search for your domain and clear all cookies.
Here’s an example of valid cookies for sessions on last 30 days report:
Reload the Dashboard
Once cookies are cleared, refresh your Analytics Insights dashboard. The system will create new cookies with updated default values based on the current report view.
Preventing Future Issues
Ensure cookies are enabled by:
- Checking your browser settings under Site Permissions or Privacy.
- Whitelisting the domain if using extensions that block cookies.
Regular Maintenance:
- Clear outdated cookies periodically to prevent unexpected behavior.
Debugging and managing cookies in Analytics Insights ensures that your report preferences are saved and prevents the frustration of being reset to the Realtime report. By following this guide, you can quickly identify and resolve cookie-related issues and improve your experience.
Leave a Reply