7 Replies Latest reply on May 10, 2016 4:19 AM by Garth Koppen

    Always create separate Google Analytics connections for Pages and Events?

    Emily Williams

      If you include both Events and Pages as Dimensions in a Google Analytics connection, you will find that the Pageviews metric is all zeroes.  It seems that the data extract that is created will populate an Event and a Page name in every single row, and the resulting metrics will only be those associated with the Events rather than the Pages.


      Do you always have to create separate data connections for Pages and Events?  (...and Custom Metrics, or any other dimension for that matter?)




      Here I attempted to include both Events and Pages dimensions and their associated measures in my connection:





      When you view the data table after creating the connection, Event related metrics work, Page related don't. (Also, Visits don't come in either, but Unique Visitors do):





      Now here's the same data connection, but I removed the Event dimensions and measures:





      Now you can see your Pageviews and Visits associated with the Page names.



        • 1. Re: Always create separate Google Analytics connections for Pages and Events?
          Emily Williams

          Additional Note!  You also need to be careful which Measures you bring in if you're going to include a Dimension other than Date. 


          For example, see my second attempt above where I limited the Dimension to only Date and Page. In addition to the Pageviews measure, this also allowed me to successfully import Unique Visitors -- but there's a catch with that! .... That is now a segmented measure of Unique Visitors per Page.  Meaning that if a Unique Visitor viewed 5 different pages during their visit, they would be counted once per page.


          Now, in Google Analytics, if you run a trended report only on Unique Visitors (without the Pagename segmentation) then those 5 pages are essentially de-duplicated, and you'd count as one Unique Visitor for that day.  But in Tableau, since you've brought in the data from the beginning segmented by Pages, if you try to trend the Unique Visitors by day you're going to be summing up all the counts and have a very inflated trend.


          Basically, you're going to have a trend that is actually showing the total number of Unique Visitors multiplied by the number of unique pages they each viewed during their visit(s).





          Conclusion: If you want to trend a single measure like Unique Visitors, then I think you need to create a separate Google Analytics data connection (extract) with ONLY date in the Dimensions.  (Can anyone see a different way to handle this?)


          I don't think there's a way to de-duplicate the Unique Visitors once you've brought in the data segmented by the Page dimension b/c there isn't a Unique Visitor ID you can use to Count Distinct UVs.

          2 of 2 people found this helpful
          • 2. Re: Always create separate Google Analytics connections for Pages and Events?
            Joshua Milligan



            Thank you very much for the notes!  I have just started using Tableau with Google Analytics and had not yet realized some of the hidden traps.  It's great to have someone point those out.




            • 3. Re: Always create separate Google Analytics connections for Pages and Events?
              Scott Carlisle

              Is there any place that helps to define all these 'traps'? I find using tableau's connection to GA a painful process. Sad user experience when it's better to just export excel files of GA data and then connect to them.

              • 4. Re: Always create separate Google Analytics connections for Pages and Events?
                Emily Williams

                Hi Scott - No, I don't think that Tableau currently has much documentation on the Google Analytics connector, but I got a response from their Support team (pasted below) saying they'd suggest to Product Management that they considering developing more.


                The link they provided below doesn't really address the question.  So, here is my recommendation: Create a completely separate Google Analytics connection for every visualization you're going to use... basically, one connection for every report tab in your workbook.  And only include the minimum number of Dimensions and Measures you'll need for that report to avoid pulling in a dataset that's been sliced and diced in ways that you're not actually going to use. 


                That's really what's at the heart of this issue... Google Analytics is pulling data from a cube, and when you change the reports in Google Analytics' own reporting interface, it's adjusting what aspects of the cube are relevant. But when you pull this data into Tableau, you're sort of flattening out the data into a table, and Tableau can't go back and get a different cut of the data based on only the relevant fields you need. Basically, it has no way to de-duplicate metrics that only applied to your segmented (drill-down) version of the report.


                And here's my recommendation to Tableau... is there a way you could create a "live" connection to the Google Analytics properties and only pull the data through the API on-demand for a particular report, rather than bringing in an extract that attempts (unsuccessfully) to flatten out all the cube dimensions the user selected during their initial connection set-up? 


                Hello Emily,


                As you noted on the forum, their are limitations to the Dimensions and Measures that may be added to the view and which ones work together.


                I will enter a feature request on your behalf for the Product Management team to review the addition of additional documentation that covers the specific Measures and Dimensions available from Google Analytics and Best Practices for use.


                If you have not seen the online article,  "Useful GA Measures", then you may wish to review this sheet as well. 



                4 of 4 people found this helpful
                • 5. Re: Always create separate Google Analytics connections for Pages and Events?
                  Garth Koppen

                  FYI, Some GA custom dimensions (depending on how they're configured) cause similar issues. It would be interesting to hear if Tableau did anything with your 'live' connection suggestion though?


                  Another FYI, your suggestion to use a different GA connection per worksheet is a good one but won't allow filters to be 'shared' across these worksheets.

                  • 6. Re: Always create separate Google Analytics connections for Pages and Events?
                    Vian Ja

                    Any news on this?

                    Im trying to find out how to avoid Tableau showing invalid data because you selected multiple dimensions.


                    When I use Users as a Measure and Date as a dimension the data is already wrong. Probably because Tableau analyses the Users per day and then adds the numbers. This causes that people are seen as a new user when they return, because Tableau analyses per day and not per month.


                    There are similar issues with other dimensions too (e.g. adding Pages, to get an overview of Users that were on a certain page. Here, the users are being retrieved per page, so this also creates a lot of double data)


                    Is there a solution for this?

                    • 7. Re: Always create separate Google Analytics connections for Pages and Events?
                      Garth Koppen

                      the only solution I found was trial and error. That is to say I tried separate data connection with different measures and dimensions until I saw data that was the same as in Google Analytics. I was really time consuming but couldn't find another way to do it.