Use this page to find answers to your analytics questions.
Account
Access analytics data
If your agency has a UA property or GA4 account we mange, learn how to access your analytics data.
Account not collecting analytics
Once your analytics ID is in production, you will need to confirm you’re collecting data to your analytics account.
If your analytics account is not collecting data, confirm:
- Your agency is using the most recent version of our California State Web Template.
- Your analytics JavaScript code matches our most recent custom template setup JavaScript code.
Contact our CAWeb Team through ServiceNow if you continue to have issues collecting analytics.
Need an analytics ID
If you don’t have an analytics ID and you’d like to start collecting data for your website, use our Google Search and Analytics Request through ServiceNow to request a Google Analytics 4 (GA4) account.
To learn more, visit our Analytics page.
Reports
Custom reports
You’re able to create custom reports for both UA properties and GA4 accounts. To learn how to customize your report further, visit Google’s help center:
- Reporting tools (UA)
- Customize reports (GA4)
Page views
Both UA and GA4 collect page view data for your website.
To view your page views for a specific timeframe:
- Visit Google Analytics to log in to your analytics account.
- From the Reports category in the left navigation, go to:
- Behavior > Site Content > All Pages (UA)
- Life cycle > Engagement > Pages and screens (GA4)
Security
Internet cookies
We’ve updated our JavaScript code to address security guidance. Add the following JavaScript code after each GA4 measurement ID on your site:
, {cookie_flags:'secure;samesite=lax;domain='}
Below is an explanation of what each item addresses:
- Secure flag: Add the “secure” flag to prevent cookies from being accessed over unencrypted connections.
- Do not set “HTTPOnly” – this will prefent JavaScript access and will cause your analytics to stop working.
- SameSite attribute: Add the “samesite=lax” attribute and value to prevent the browser from sending your GA4 measurement ID cookies along with cross-site request. This helps mitigate the risk of cross-site request forgery attacks.
- Do not set the value of “strict” – this will cause your analytics to stop working.
- Cookie domain: Add “domain=” to restrict your GA4 measurement ID cookies to the specific domain. The GA4 measurement ID will be automatically set to the site domain, without wildcards, preventing the cookie from traveling across ca.gov sites.
To learn more about where to add the new JavaScript code, visit our Custom template setup section on our Add analytics to your site page.
Search
Link Search Console
If you have an existing Search Console that our CAWeb Team manages, our team will link your Search Console to your dashboard when creating a new analytics account/property.
If you manage your own Search Console, we are unable to link it to your dashboard. You will need to link it yourself:
- Visit Google Analytics to log in to your analytics account.
- Select the account and property you want to link.
- Under the property, click on Search Console Links under Product Links and follow the prompts.
- Once linked, you will need to go to Reports > Library and publish the Search Console collection. This will display your Search Console analytics section under your Reports dashboard.
Resources
Google Analytics 4 (GA4)
- Google Analytics 4 training and support
- Walkthrough of the Google Analytics 4 Properties User Interface (YouTube)
Analytics Mania
- Google Analytics Tips
- Customizing Standard Reports in GA4 (YouTube)
- Path exploration in GA4 (YouTube)
- Funnel exploration in GA4 (YouTube)
Universal Analytics (UA)
Google Tag Manager
Analytics Mania
Contact us
Still have questions? Contact our CAWeb Team through ServiceNow with any analytics related questions.