BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
CTurley
Fluorite | Level 6

Has anyone tried connecting to the Google Doubleclick (DFP Adserver) API. I have read different documentation on connecting to Google Analytics and other API's through SAS, bit when I apply these to my situation, it does not seem to ad up. It seems these APIs are different and more complicated. IT uses some JST Headers? I am looking for sample code if anyone has created any for this API.

1 ACCEPTED SOLUTION

Accepted Solutions
CTurley
Fluorite | Level 6
The api setup in the google dasboard was incorrect. It was under the web development type and should have been other. All is well now.

View solution in original post

5 REPLIES 5
ChrisHemedinger
Community Manager

I think it depends on what you want to do.  Are you downloading reports?  Or uploading conversions data?

 

Glancing over the doc about the API, it looks like a very similar setup to Google Analytics in that there is a REST API that can be driven from HTTP, which means that you ought to be able to accomplish this with PROC HTTP.

 

See my complete paper about Google Analytics with SAS - it might help.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
CTurley
Fluorite | Level 6

What do I use as a redirect url?

ChrisHemedinger
Community Manager

To get your auth token?  In my paper, I covered this -- the URL for the call looks something like this:

 

https://accounts.google.com/o/oauth2/v2/auth? 
  scope=https://www.googleapis.com/auth/analytics.readonly
 &redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code
 &client_id=yourappid.apps.googleusercontent.com

(But all on one line)

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
CTurley
Fluorite | Level 6

What is the Client secret? Is that the API Key? I have in the google API dashboard a APIKey, ClientID and a Service Account Key (ID).

CTurley
Fluorite | Level 6
The api setup in the google dasboard was incorrect. It was under the web development type and should have been other. All is well now.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1700 views
  • 1 like
  • 2 in conversation