<?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 Re: Exploiting Google Analytics in SAS: Examples? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/350588#M269610</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" rel="nofollow noopener noreferrer"&gt; possible to fetch Google Analytics data via Base SAS code&lt;/A&gt;. &amp;nbsp;This does require SAS 9.4m4.&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" rel="nofollow noopener noreferrer"&gt;are in this blog post&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2017 17:55:18 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2017-04-17T17:55:18Z</dc:date>
    <item>
      <title>Exploiting Google Analytics in SAS: Examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/276181#M269607</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to exploit Google Analytics data. We found several documents and blogs, but they're all quite 'old'. The SAS Support team indicated that a lot changed in the meantime and that these articles are outdated. They suggest to work with PYTHON.&lt;/P&gt;
&lt;P&gt;Does anybody have some examples of this?&lt;/P&gt;
&lt;P&gt;Note: the solution should run on Linux 9.3. 'Plan B'&amp;nbsp; is to run it on Windows. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henri&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 17:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/276181#M269607</guid>
      <dc:creator>HenriTheuwissen</dc:creator>
      <dc:date>2017-04-17T17:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exploiting Goodle Analytics in SAS: Examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/276341#M269608</link>
      <description>&lt;P&gt;You did not mention what SAS tools/products you have.&amp;nbsp; Most modern presentations that I have seen on this topic use a tool such as &lt;A href="http://support.sas.com/documentation/cdl/en/vaug/68027/HTML/default/viewer.htm#p1pfcz6uso42h4n13gnqhh4pprdv.htm" target="_self"&gt;SAS Visual Analytics.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 18:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/276341#M269608</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-09T18:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exploiting Goodle Analytics in SAS: Examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/276411#M269609</link>
      <description>&lt;P&gt;Hi Rick,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We do not have Visual Analytics&lt;/P&gt;
&lt;P&gt;We do have the 'traditional' SAS/EIP platform (with SAS/DI, IMap, Web Report Studio, OLAP Cubes etc.) &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 04:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/276411#M269609</guid>
      <dc:creator>HenriTheuwissen</dc:creator>
      <dc:date>2016-06-10T04:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exploiting Google Analytics in SAS: Examples?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/350588#M269610</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" rel="nofollow noopener noreferrer"&gt; possible to fetch Google Analytics data via Base SAS code&lt;/A&gt;. &amp;nbsp;This does require SAS 9.4m4.&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" rel="nofollow noopener noreferrer"&gt;are in this blog post&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 17:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exploiting-Google-Analytics-in-SAS-Examples/m-p/350588#M269610</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-04-17T17:55:18Z</dc:date>
    </item>
  </channel>
</rss>

