Google Analytics authorization and consent errors

Overview

Viewing Site analytics, it will display an unauthorized message:

"You are not currently authorized to view the data. Ensure you have correctly set up the Google Analytics Connector and that the DNN Google Analytics application is still authorized on your Google Account settings."

Or, alternatively:

Error: User must consent Google Analytics access first

These errors prevent the use of Google Analytics.

 

Environment

This error is most frequently reported in DNN Evoq version 9.1.1 after a migration or upgrade.

To solve this issue, you will need:

  • Access to a SuperUser account.
  • Access to SQL console or SQL Server.
  • Database backup

 

Solution

1. Make sure that Google Analytics has been set up, follow the KB: integrate Google Analytics with DNN. This is the service that the site analytics section uses. 

If you have already set up Google Analytics previously, move to the following steps.

NOTE: Always take a database backup before running SQL queries. 

1. Go to Persona Bar > Settings > SQL Console.

sqlconsole.jpg

2. Execute the following query to find the PortalID of the affected instance:

SELECT portalid from portalalias where httpalias = 'YOUR_WEBSITE_ADDRESS_HERE'

NOTE: In the above query, do not use http or https in your website address. 

3. Once you have the PortalID, disable the analytics microservice by executing the following:

UPDATE PortalSettings SET SettingValue = 'False' WHERE SettingName = 'AnalyticsEnabled' AND PortalID = ENTER_PORTAL_ID_HERE

4. Execute the following to delete the remaining analytics details in the portal:

DELETE FROM PortalSettings WHERE SettingName IN ('AnalyticsAccountCode','AnalyticsClientCredentials') AND PortalID = ENTER_PORTAL_ID_HERE

5. Clear your cache.

6. Go to Persona Bar > Dashboard > Site Analytics and enable the Analytics when you receive the Enable prompt.

 

 

Testing

Validate that Analytics is now working by going to Persona Bar > Dashboard > Site Analytics. If successful, you will see the data as intended. 

 

Comments

1 comment

  • Avatar
    Aaron

    This has happened to us several times and we have no idea why.  It's happening right now and because we run over 200 portals the above method isnt really reasonable.  I checked and DNN api.com is authorized in my Google Account and so everything should work. Any idea why this is happening?  We are running Evoq Enterprise 09.03

     

    I should add that I have revoked access and added it back and disconnected and reconnected several times on multiple portals and still we get that error.

    0
    Comment actions Permalink

Please sign in to leave a comment.