10 Replies Latest reply: Jun 9, 2016 4:40 PM by Stefan Jevtic RSS

    Google Analytics with rest connector

    Rohit Kumar

      Hi,

      I just made a connection with google analytics with the help of rest connector . The dimension and measure i ave used while connection are:

      dimensions=ga:mobileDeviceInfo,ga:source

      metrics=ga:sessions,ga:pageviews,ga:sessionDuration

       

      Now I have received two tables in Qlik sense , One contains two columns dimensions value and name.

      Second contains: measure name and values.

      Now point here is there is no connection between them ,no keys. So can you please tell me what exactly I am missing.

      Second I made connection one day before today i try to connect it showing error , so i need to again do all connectivity. how to make connection so I don't need to follow the same path again.

       

      Please explain in details and step wise.

      This is on urgent basis.

        • Re: Google Analytics with rest connector
          Michael Tarallo

          Hello Rohit,

           

          Can you take a look at the Google Analytics section (bottom of page) here in this help document just to make sure this is the same method of connecting:

           

          http://help.qlik.com/en-US/connectors/Subsystems/REST_connector_QV_help/Content/1.0/Create-REST-connection/Connection-examples.htm?q=google%20analytics

           

          I have not played with this yet so I am not exactly sure of the behavior. I will attempt to set up an example in my environment.

           

          Let me know.

           

          Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

           

          Regards,

          Mike Tarallo

          Qlik

          • Re: Google Analytics with rest connector
            Rohit Kumar

            Hi Mike,

            Hope you are doing good!

            I have made  a connection with google analytics through Rest Connector but problem is coming here , the session key which i get from the developer tool of google analytics expires in 1 hour somehow duration. so again i need to generate new session key like:

             

            Bearer ya29.CjbcAgzhu3ZP4gI1u8yUvaPG-z4A8i9kFTkLzQqvBA5EuY8p7KPMmURm27wVx1cvNu1d

             

            So the first point is how to get a key or make a connection which works while upload the app to server.

             

            I don't know how to get the mention OAuth oauth_Consumer_key

             

            Can you please help me to know how to get this key, See all the tutorial available , they just tell us how to made a temporary connection.

              • Re: Google Analytics with rest connector
                Michael Tarallo

                Hello Rohit - I do not know this answer, but perhaps jog might know. Please allow some time for him to reply as he has other responsibilities and may not be able to reply just yet.

                 

                 

                Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

                 

                Regards,

                Mike Tarallo

                Qlik

              • Re: Google Analytics with rest connector
                Rohit Kumar

                Thanks Mike,

                For the time being I am also working to figure it out. I will wait for JOG response hope he will find soon a good solution.

                • Re: Google Analytics with rest connector
                  Meelis Eesoja

                  Simple workaround solution that I discovered is to use Google Sheets with SuperMetrics add-on. Let SuperMetrics crab data from source(s) and structure it to table(s) in Google Sheets. Then publish spreadsheet as Excel and use the link as web file connection in Sense.

                  SuperMetrics Pro version will cost around 50€ per month depending on purchase model. Small price to pay compared to QVSource connectors or to hassle one has to go through with REST Connector.

                    • Re: Google Analytics with rest connector
                      Stefan Jevtic

                      I disagree that a long term solution to the REST session key timeout should be "pay someone else to do it." Qlik has a pretty solid REST connector and great documentation. I'm interested to hear from JOG.

                        • Re: Google Analytics with rest connector
                          Rohit Kumar

                          Hi Stefan,

                          I agree with you that Qlik has pretty solid rest connector and great documentation so can you please help me to make a connectivity of Qlik and google analytic by rest connector , See what the procedure in available on vieos or Youtube or other that i have stated above , every time I need to generate session key and run and what data comes that is not as anyone can make any charts,Hope you understand what I am looking for:

                            • Re: Google Analytics with rest connector
                              Stefan Jevtic

                              Rohit,

                               

                              I understand your issues, both with the transient session keys and the data formatting. These are both issues I am facing myself, and I imagine we're in the same boat. I have started a new discussion (at least attempted to) on the session key matter at OAuth 2.0 REST Refresh Token, and have not yet done enough research to either a.) get the data formatting figured out or b.) be able to ask a useful pointed question.

                               

                              Before I do, let me make sure we're having the same data issue. If you're grabbing 5 fields, it's not coming in table format, correct? It's a single row with the 5 fields stacked per entry. Is that accurate?

                                • Re: Google Analytics with rest connector
                                  Rohit Kumar

                                  Hi Stefan,

                                  I was looking to your new discussion but unfortunately there is no commented added after creation ,Lets wait for a while,hope we will get some response.

                                   

                                  Best,

                                  Rohit Kumar

                                    • Re: Google Analytics with rest connector
                                      Stefan Jevtic

                                      Rohit,

                                       

                                      I'm not going to address the token thing, since I've got that attempted discussion going elsewhere. However, on the data format question, I think that's likely to be solved by diving into Google's Core Reporting API (What Is The Core Reporting API - Overview  |  Analytics Core Reporting API  |  Google Developers). You're going to have to decide ahead of time exactly what data you want (dims and metrics) and exactly what format, then you'll have to write the query yourself. Barring outliers, Qlik Community is unlikely to be the forum to which you're going to want to reach out in order to get that particular problem solved.

                                       

                                      Personally, if I end up going down that route I will likely abandon the REST Connector and instead write the GA local import in python using the Core Reporting API mentioned above. Then I'd be free to build it into a format Qlik Sense is happy with and then set up a folder data connection or something. But this is now adding layers to the cake and I'm not convinced it's a worthy use of my time.


                                      Now, I haven't spent a lot of time with this, but I think that would be my personal plan of attack. Remember also I likely won't go down that road, as this whole thing is meant to save me time and let me focus my development efforts elsewhere, rather than add to the headache. Good luck.