An error occurred while running mapSelect: Cannot read property getReport of null
Analytics gathering data
Data error in Analytics: User does not have sufficient permissions for this profile
How to ensure your Analytics tag is firing and your visits are being tracked
Using cookie consent plugins with Site Kit

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

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 snippet. 

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

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

Data error in Analytics: User does not have sufficient permissions for this profile

This error occurs when the Google account that you used to connect to Analytics with Site Kit does not have permission to access the necessary Universal Analytics data in Google Analytics, so it cannot be displayed on the Site Kit Dashboard. 

To resolve this error, contact an administrator for the Analytics account associated with your site’s Universal Analytics property and request that they add your Site Kit-connected Google account with Viewer permissions or above in Analytics. More details on Analytics permissions are available in this guide.

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 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 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 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

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.