<?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: How to import Google Analytics data into SAS? in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403412#M8336</link>
    <description>&lt;P&gt;Thanks a lot. That resolves the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I receive another error "400 Bad Request". I think it's related to this line. When I ran the URL in a browser, it returns "Not Found". Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let oauth2=https://www.googleapis.com/oauth2/v4/token;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here's the full code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename token "c:\temp\token.json";
%let code_given =&amp;lt;code-returned-from-step-1&amp;gt; ;
%let oauth2=https://www.googleapis.com/oauth2/v4/token;
%let client_id=&amp;lt;your-client-id&amp;gt;.apps.googleusercontent.com;
%let client_secret=&amp;lt;your-client-secret&amp;gt;;
proc http
 url="&amp;amp;oauth2.?client_id=&amp;amp;client_id.%str(&amp;amp;)code=&amp;amp;code_given.%str(&amp;amp;)client_secret=&amp;amp;client_secret.%str(&amp;amp;)redirect_uri=urn:ietf:wg:oauth:2.0:oob%str(&amp;amp;)grant_type=authorization_code%str(&amp;amp;)response_type=token"
 method="POST"
 out=token
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Oct 2017 01:39:07 GMT</pubDate>
    <dc:creator>GregSo</dc:creator>
    <dc:date>2017-10-12T01:39:07Z</dc:date>
    <item>
      <title>How to import Google Analytics data into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403046#M8315</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS and want to import data from Google Analytics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am following the post (&lt;A href="https://blogs.sas.com/content/sasdummy/2017/04/14/using-sas-to-access-google-analytics-apis/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2017/04/14/using-sas-to-access-google-analytics-apis/&lt;/A&gt;) to import Google Analytics data with SAS. The version I use is SAS 9.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I got an error (NOTE: The quoted string currently being processed has become more than 262 bytes long.&amp;nbsp; You might have unbalanced quotation marks.) on the code below. Any Advise?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http
/* put this all on one line! */
 url="&amp;amp;oauth2.?client_id=&amp;amp;client_id.%str(&amp;amp;)code=&amp;amp;code_given.%str(&amp;amp;)client_secret=&amp;amp;client_secret.%str(&amp;amp;)redirect_uri=urn:ietf:wg:oauth:2.0:oob%str(&amp;amp;)grant_type=authorization_code%str(&amp;amp;)response_type=token"
 method="POST"
 out=token
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 07:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403046#M8315</guid>
      <dc:creator>GregSo</dc:creator>
      <dc:date>2017-10-11T07:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to import Google Analytics data into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403138#M8322</link>
      <description>&lt;P&gt;Are you using SAS Visual Analytics? In VA 7.2 and later you can import data from Google Analytics through the UI:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/vaug/68027/HTML/default/viewer.htm#p1pfcz6uso42h4n13gnqhh4pprdv.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/vaug/68027/HTML/default/viewer.htm#p1pfcz6uso42h4n13gnqhh4pprdv.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 12:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403138#M8322</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2017-10-11T12:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to import Google Analytics data into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403150#M8325</link>
      <description>&lt;P&gt;Assuming you've set the&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;&lt;SPAN class="token string"&gt;oauth2&lt;/SPAN&gt;&lt;/LI-CODE&gt;
&lt;P&gt;macro variable as shown in the example that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;provided, you could always try to run this line first:&lt;/P&gt;
&lt;PRE&gt;options NOQUOTELENMAX;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 13:14:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403150#M8325</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-10-11T13:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to import Google Analytics data into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403408#M8335</link>
      <description>&lt;P&gt;Yes, I know I could use the UI. But, it has the limitation of fixed data size (once you've created the lasr table, you cannot add data to that table). What I want to achieve is that to make the lasr table (data source) grow such that my report linked to that data source could have up-to-date data. That's why I use the script to download the data into a staging table and then massage the data to the lasr table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing it correctly? Any easier alternative?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 01:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403408#M8335</guid>
      <dc:creator>GregSo</dc:creator>
      <dc:date>2017-10-12T01:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to import Google Analytics data into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403412#M8336</link>
      <description>&lt;P&gt;Thanks a lot. That resolves the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I receive another error "400 Bad Request". I think it's related to this line. When I ran the URL in a browser, it returns "Not Found". Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let oauth2=https://www.googleapis.com/oauth2/v4/token;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here's the full code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename token "c:\temp\token.json";
%let code_given =&amp;lt;code-returned-from-step-1&amp;gt; ;
%let oauth2=https://www.googleapis.com/oauth2/v4/token;
%let client_id=&amp;lt;your-client-id&amp;gt;.apps.googleusercontent.com;
%let client_secret=&amp;lt;your-client-secret&amp;gt;;
proc http
 url="&amp;amp;oauth2.?client_id=&amp;amp;client_id.%str(&amp;amp;)code=&amp;amp;code_given.%str(&amp;amp;)client_secret=&amp;amp;client_secret.%str(&amp;amp;)redirect_uri=urn:ietf:wg:oauth:2.0:oob%str(&amp;amp;)grant_type=authorization_code%str(&amp;amp;)response_type=token"
 method="POST"
 out=token
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Oct 2017 01:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-import-Google-Analytics-data-into-SAS/m-p/403412#M8336</guid>
      <dc:creator>GregSo</dc:creator>
      <dc:date>2017-10-12T01:39:07Z</dc:date>
    </item>
  </channel>
</rss>

