If the widget is not displaying data correctly, use this guide to resolve common issues.
1. GA4 Library Class Not Found
Error:
GA4 library class not found
Cause: Composer dependencies missing or not loaded.
Fix:
cd /modules/widgets/google_analytics composer install --no-dev
2. Service Account JSON Not Readable
Error:
Service account JSON not readable
Fix:
- Verify file path is correct
- Ensure file exists
- Set permissions:
chmod 600 /path/to/google-service-account.json
3. GA4 Permission Denied
Error:
User does not have sufficient permissions
Fix:
- Add service account email to GA4 property
- Assign Viewer role
4. Search Console Permission Error
Error:
User does not have sufficient permission for site
Fix:
- Add service account email in Search Console
- Ensure property matches exactly
5. Invalid Date Error
Error:
'7daysAgo' is not a valid date string
Fix:
The API requires dates in YYYY-MM-DD format. Ensure your widget is updated to the latest version.
6. API Not Enabled
Error:
SERVICE_DISABLED
Fix:
- Enable Google Analytics Data API
- Enable Search Console API
7. Debug Mode
Enable debug mode by adding the following to the URL:
&stga_debug=1
This will display additional diagnostic information.
Still Need Help?
If issues persist:
- Check server error logs
- Verify Composer installation
- Confirm correct GA4 Property ID
- Contact Snowtech support