<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to fetch Google Analytic Data into SAS through SAS Code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/237107#M268245</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one guide me how to fetch Google Analytics Data through SAS Programing,&lt;/P&gt;
&lt;P&gt;thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kaushal Solanki&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2015 07:09:26 GMT</pubDate>
    <dc:creator>kaushalsolanki</dc:creator>
    <dc:date>2015-12-01T07:09:26Z</dc:date>
    <item>
      <title>How to fetch Google Analytic Data into SAS through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/237107#M268245</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one guide me how to fetch Google Analytics Data through SAS Programing,&lt;/P&gt;
&lt;P&gt;thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kaushal Solanki&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 07:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/237107#M268245</guid>
      <dc:creator>kaushalsolanki</dc:creator>
      <dc:date>2015-12-01T07:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch Google Analytic Data into SAS through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/238010#M268246</link>
      <description>&lt;P&gt;Hi Kaushai,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this paper from SAS Global Forum &lt;A href="http://support.sas.com/resources/papers/proceedings10/049-2010.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings10/049-2010.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and there's also this blog article &lt;A href="http://www.sasanalysis.com/2011/11/when-google-analytics-meets-sas.html" target="_blank"&gt;http://www.sasanalysis.com/2011/11/when-google-analytics-meets-sas.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't tried any if this myself but the two authors cover the topic well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing I'll add: these articles are from 2010/2011 so things may have changed and there might be new methods you could use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;Steve&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2015 13:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/238010#M268246</guid>
      <dc:creator>SteveM_UK</dc:creator>
      <dc:date>2015-12-06T13:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch Google Analytic Data into SAS through SAS Code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/350587#M268247</link>
      <description>&lt;P&gt;Coming back to this because now with PROC HTTP and the JSON libname engine, it's&lt;A href="http://blogs.sas.com/content/sasdummy/2017/04/14/using-sas-to-access-google-analytics-apis/" target="_self"&gt; possible to fetch Google Analytics data via Base SAS code&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;High level steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Grant permission and obtain an authorization token for your "app" (a SAS program, in our case). This must be performed in a browser while logged into your Google account.&lt;/LI&gt;
&lt;LI&gt;Obtain an access token and refresh token. You can accomplish this with a SAS program that you run just once. You then save the refresh token (in a safe place!) for subsequent runs.&lt;/LI&gt;
&lt;LI&gt;Convert your saved refresh token into an access token. Do this at the start of every SAS job that needs to get Google Analytics data.&lt;/LI&gt;
&lt;LI&gt;And finally, use the Google Analytics API to get actual data!&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Details &lt;A href="http://blogs.sas.com/content/sasdummy/2017/04/14/using-sas-to-access-google-analytics-apis/" target="_self"&gt;are in this blog post&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 17:52:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-fetch-Google-Analytic-Data-into-SAS-through-SAS-Code/m-p/350587#M268247</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-04-17T17:52:55Z</dc:date>
    </item>
  </channel>
</rss>

