Help with analytics

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:

  1. Your agency is using the most recent version of our California State Web Template.
  2. 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.

We no longer create new Universal Analytics (UA) property IDs. Visit Transition from Universal Analytics to Google Analytics 4 for more information.

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:

Page views

Both UA and GA4 collect page view data for your website.

To view your page views for a specific timeframe:

  1. Visit Google Analytics to log in to your analytics account.
  2. From the Reports category in the left navigation, go to:
    1. Behavior > Site Content > All Pages (UA)
    2. 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:

  1. Visit Google Analytics to log in to your analytics account.
  2. Select the account and property you want to link.
  3. Under the property, click on Search Console Links under Product Links and follow the prompts.
  4. 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

Contact us

Still have questions? Contact our CAWeb Team through ServiceNow with any analytics related questions.