An error occurred while running mapSelect: Cannot read property getReport of null

This error can display if you have your site’s JavaScript files minified, usually via a caching or optimization plugin configuration. The error displays when using the Site Kit admin toolbar and visiting the front-end of your site. This is only visible to logged-in users who have access to this admin toolbar.

The best way to address this error is to exclude Site Kit plugin files from minification in your caching plugin. We’ve added exclusions which can be applied for some popular caching plugins below:

  • WP Asset Cleanup: /wp-content/plugins/google-site-kit/
  • Autoptimize: /content/plugins/google-site-kit
  • WP Optimize: /wp-content/plugins/google-site-kit/dist/assets/js/(.*).js

For plugins not listed above, you can check for any minification configurations within the optimization plugin’s settings. If you have questions about how to apply exclusions for the particular plugin that you are using, please contact the plugin’s support.

Note that Site Kit JavaScript resources are already minified, so applying exclusions is an alternative to deactivating any minification features within your caching or optimization plugin. Some plugins, such as WP Rocket, already exclude Site Kit resources from minification by default. 

Analytics gathering data

Gathering Data notice

If you’ve only recently connected your site with Google Analytics, this message is expected as Analytics first begins to collect data for your site. This initial data collection normally takes a day or two if your website does have traffic to be reported on. Once your site has traffic, the Site Kit dashboard will populate accordingly. 

If this message continues to display after several days, your Analytics connection may not have been successful or there may be something blocking Analytics reporting on your site, such as a cookie-related plugin or a plugin that makes modifications to your Analytics code snippet. 

Check to make sure that your Analytics code snippet was properly placed in your site’s source code:

  • Go to the front-end of your website, right-click, and select Inspect. Your site’s code snippet will display in a bottom panel.
  • Hit CTRL + F on your keyboard to search
  • Search for google_gtagjs-js-after
  • If you see a code snippet similar to the below, Analytics was successfully connected and it may just take time for your Analytics data to begin showing in Site Kit.
The Analytics code snippet added to a users site

How to ensure your Analytics tag is firing and your visits are being tracked

There are various ways that you can check to ensure that Google Analytics is working as expected on your site:

  • Check your Google Analytics Real-Time report. After you’ve activated Analytics within Site Kit, visit your Analytics real-time dashboard at analytics.google.com while visiting your site as a non-logged-in user. This visit will be recorded if your Google Analytics setup is working as expected. 
  • Use tagassistant.google.com. This tool allows you to check the Google Analytics and Tag Manager code snippets on your site:
    • Visit https://tagassistant.google.com
    • Log in with your Google account
    • Click on Add domain
    • Enter your website domain name and press Connect
    • Wait for your site to be scanned in a new tab or window. Once complete, you’ll see a Connected notice back in your Tag Assistant tab. Press Continue.
    • You’ll see the connected Analytics property and a summary of whether or not hits were recorded

If your Google Analytics setup is not working as expected, or your own visits are not being recorded, you can check:

  • Your Google Analytics configurations within Site Kit. Have you allowed Site Kit to insert your code snippet? Are you trying to track your own visit? If so, ensure that you’re not logged in to your site or ensure that you are recording all traffic, including logged-in users. 
  • Cookie and consent-tracking plugins. If you’re using a plugin for GDPR compliance that requires users to accept or decline cookies, Analytics tracking will not occur until and unless users accept the use of cookies.
  • Optimization or caching plugins. Some plugins may have minification or other features that can alter the behavior or functionality of the Site Kit-placed Analytics code snippet.

If you have checked these things and still need help determining why Analytics may not be working, reach out to the Site Kit support team in the WordPress support forums

Insufficient permissions

Insufficient permissions errors related to Google Analytics can occur when:

  • The connected Google Analytics property was changed: Other WordPress administrators have the ability to disconnect and reconnect the Analytics module within Site Kit. They may have connected Site Kit to an Analytics property which you do not have access to. To resolve this, reach out to the other WordPress administrator who may have connected Google Analytics and ask them to grant access to the Google account that you used to set up Site Kit. Alternatively, you can use the Request Access button to ensure that the property owner is notified, and from there, they can grant you access.

    Another option is to disconnect the Analytics module and reconnect to an Analytics account that you have access to. Note that this will change the existing Analytics property, which may already have data associated with it. In addition, unless you grant other website administrators access to this property, they will experience similar permission errors if using the Site Kit dashboard. 
  • The Google account associated with Site Kit was changed: If you connect Google Analytics with one Google account and then connect any additional services with a different Google account, Site Kit will switch to the most recently used Google account by default. This newly connected Google account may not have access to the connected Analytics property, which results in this error. To resolve this, visit Google Analytics using the Google account that you initially used to set up Site Kit and grant access to the additional Google account. Alternatively, you can disconnect your Google Account from Site Kit and connect once more, this time using the Google account which you initially used to set up Site Kit.

    Another option is to disconnect the Analytics module and reconnect to an Analytics account that you have access to. Note that this will change the existing Analytics property, which may already have data associated with it. In addition, unless you grant other website administrators access to this property, they will experience similar permission errors if using the Site Kit dashboard. 
  • The connected Google Analytics property was deleted or permissions were changed: There may have been changes made at the Analytics level to the property connected in Site Kit. The property may be deleted or other property owners may have removed access or moved the property to a Google Analytics account that you don’t have access to. To resolve this, visit Google Analytics using the Google account that you used to set up Site Kit and ensure that the property was not deleted. If it was deleted, you may be able to restore it. If the property was not deleted, and you don’t see the property available, you can request access from another user who may have access. Alternatively, you can use the Request Access button to ensure that the property owner is notified. From there, they can grant you access. 
  • Google Analytics is not enabled at Workspace level: This error can appear if the Google account that you used to set up Site Kit is a Google Workspace account and Google Analytics has been disabled at Workspace level. If you’re using a Google Workspace email, reach out to your Google Workspace administrator to ask them to turn on permissions for Analytics for your Google account.
  • You do not have the necessary permissions in Google Analytics for Site Kit to create custom dimensions on your behalf: Some Site Kit features, such as certain Key Metrics Widget tiles, require the creation of custom dimensions in Analytics in order to track and report on additional data. When necessary, Site Kit will attempt to create these custom dimensions in Analytics for you. However, custom dimensions can only be created by Analytics Administrators and Editors. If you do not have this level of access, custom dimensions cannot be created and you will see an Insufficient permissions error.

Using cookie consent plugins such as Complianz and CookieBot alongside Site Kit may cause Analytics to be tracked inconsistently. This can occur when a visiting user has not consented to the use of cookies or has declined to accept cookies. 

To check if your cookie plugin is blocking Analytics site view data:

  1. Go to your Analytics account
  2. Select the account and property for your website
  3. From the left menu go to Reports > Realtime > Overview
  4. Open a new incognito browsing window and navigate to your website. Ignore or decline your cookie consent notice.
  5. In your Analytics realtime window, check if your visit hasn’t been recorded. One of the easiest ways to find your own visit is to go to Reports > Realtime > Locations, click your country, and then look for your location. Note that if you are using a VPN you should be looking for the location associated with your VPN. 
  6. If it has not, then try the process again in a new incognito window, and this time accept the cookie notice. You should now see your site visit registered. 

Note: This may be more difficult to check if your site has high volumes of traffic.

Some cookie consent plugins may have an option within the settings to turn off the ability to block scripts from firing before consent is given. Not all of these plugins will have this option, so if you don’t want your site visit data to be affected, you can either try a different cookie consent plugin or disable the plugin.

Your Analytics configuration has changed. The previously selected web data stream with measurement ID G-** is no longer available. Please select a new web data stream to continue collecting data with Google Analyticss.

The error message on the dashboard
The error message in Analytics settings

This message displays when the connected Analytics data stream is not available. This can be because the data stream has been deleted or there is an issue at the host level. You can check if the Analytics data stream referenced in Site Kit is active by accessing your Analytics account

This message will show in the dashboard and in the Site Kit Analytics settings. If the Analytics data stream referenced is not active, you can update to a different data stream by selecting the Update Analytics Settings button from the dashboard or by going to Site Kit > Settings > Connected Services > Analytics > Edit

If the issue is at the host level, this can in some cases be resolved by adding the Analytics code snippet manually.
If you continue to see this message or require further assistance, you can open a new support topic.

Additional Analytics Support

For additional assistance, feel free to open a support topic on our WordPress.org support forum. Note that we are limited to Site Kit-related questions about Google Analytics, including questions about:

  1. Google Analytics module setup or functionality issues within Site Kit
  2. The configuration options within the Google Analytics module in Site Kit
  3. The Traffic section of the Site Kit dashboard
  4. Google Analytics error messages, notices, or warnings within Site Kit
  5. Google Analytics permission notices within Site Kit

For Google Analytics-specific questions such as help with site or account approvals, use the Google Analytics Help Center for assistance. Note that the Site Kit support team does not have access to users’ Google Analytics accounts and are unable to assist with account-related issues. 

Additional Resources