Publishing A Google Analytics Data Source Or A Workbook Linked To A Google Analytics Data Source into Tableau Server

We can create informative reports on our website analytics using Tableau. Tableau has the ability to connect to a Google Analytics data source. The problem is that if Tableau cannot pass the credentials to Google automatically, the following error message pops up.

image

“An error occurred when publishing the data source. GetOAuthUsername caught exception processing specs. Response code: 500”

So, how we can publish a Google Analytics data source into a Tableau sever? How we can publish created Tableau worksheets that are linked to a Google Analytics data source into the Tableau server? Why the above error message pops up and how we can resolve the problem? These and some more questions are going to be answered in the following post. But, first of all, how we can use Tableau to create reports based on Google Analytics data sources?

Creating reports for Google Analytics using Tableau Desktop

Open Tableau desktop and

1.       Click on “Connect to data”

image

2.       From “Connect to Data” pane click on “Google Analytics”

image

3.       Enter the credentials and click “Sign in”

image

4.       Accept the permissions that Tableau Desktop needs to connect to your Google account

image

5.       Follow the steps below:

a.       Choose an Account, Property and Profile

b.      Select date range

c.       Select dimensions and measures (up to 7 dimensions and 10 measures)

d.      Give the connection a name for use in Tableau

e.      If you want to sign in to another Google account just click on “Change Sign In…” button

f.        Click OK

image

6.       Now we can create a report for site visits per date. Name the worksheet as Google Analytics.

image

Publishing Google Analytics data source into Tableau server

1.       Right click on “Google Analytics” data source from the data pane and click “Publish to server”

image

2.       Enter your Tableau credentials and click OK

image

3.       Select the site that you want to publish the data source

image

4.       Add the users that should see the worksheet and set their permissions by clicking on “Add…” button, then click “Publish”

image

5.       Now, Tableau asks the following question “For this datasource to be scheduled for refresh on the Server, you must embed credentials. If you continue to publish without embedding credentials, this datasource will be removed from any existing schedules. Would you like to embed credentials now?” Here you if you click “Yes” the error message will pop up, so, for now just click “NO”.

image

6.       Now the Google Analytics datasource is published into Tableau server.image

Publishing a workbook linked to a Google Analytics data source into Tableau server

1.       In Tableau desktop, open “Server” menu and select “Publish Workbook”

image

2.       Click “Publish”

image

3.       Tableau will ask the same question number 5 in previous section. Click “NO”.

4.       All done.

image

How to refresh a published Google Analytics data source?

As discussed in Introduction section, Tableau cannot pass Google credentials unattended; at least it cannot do that now. So, the published data source needs to be refreshed manually. To refresh the Google Analytics data source:

1.       Open Tableau desktop and select “Tableau Server” from the left pane

image

2.       Enter your Tableau credentials to connect to Tableau server

image

3.       Select the site

image

4.       Click on “Google Analytics” data source

image

5.       Right click on the Google Analytics data source-> Tableau Data Server-> Refresh from Source

image

6.       Enter the credentials and click “Sign in”

image

7.       Accept the permissions that Tableau Desktop needs to connect to your Google account

image

8.       The data source is successfully refreshed.

How to automatically refresh a published Google Analytics data source based on Tableau Server Schedules?

So far we didn’t resolve the problem! The problem was that when we wanted to publish the Google Analytics data source into Tableau server, if Tableau server couldn’t pass the credentials to Google, an error message pops up. If we do not select “Embedded password” in “Authentication” part when we are publishing the Google Analytics into Tableau server, the data source won’t be refreshed automatically based on a predefined schedule in Tableau server. But, why Tableau server cannot pass the Google credentials? We need to check our firewall settings to see if it blocks ports 80 and 443. Google Analytics uses ports 80 and/or 443. After correcting the firewall settings Tableau server should be able to pass Google Analytics credentials. So, we need to republish the Google Analytics into Tableau.  The steps for publishing are the same as we did before in number 5 of “Publishing Google Analytics data source into Tableau” section. The only difference is that we need to select “Embedded password” in Authentication section. We can select a predefined schedule in “Refresh Extract – Full” section and the click “Publish”.

image

Now the Google Analytics data source is successfully published and it will refresh automatically from Tableau Server based on selected schedule.

image

We can check the schedule task from Tableau Server to see if the published data source is refreshing as expected. All done.

image

2 thoughts on “Publishing A Google Analytics Data Source Or A Workbook Linked To A Google Analytics Data Source into Tableau Server”

  1. I encountered the same error as you, but I can’t manage to fix it. My firewall is disabled, so there should be no rules for blocking those ports active. Moreover, we also have a proxy defined which goes on port 8080. If you have any idea, please let me know. Thanks.

  2. Hi Cristina,
    As far as all the ports using by the Tableau server are open in the proxy settings you should be fine.
    Are you using SSL? If so, make sure that SSL Certificate configured and installed correctly.
    Please let us know if you had any further questions.

Leave a Reply