Google Analytics兴趣API [已关闭]

google analytics offers the interests of the users of my website. I was wondering, if there is a way for me to access ther interests of the current user with php. Is that a part of the google api? I am asking this, because i am trying to find a way to deliver ads to the different users. I think it would be a great improvement if i could somehow find out what the user is interested in. Thanks in advance.

Analytics Reporting API V4

Yes it is possible to query the Analytics Reporting API V4 for the audience dimensions. Try a sample query in the Query explorer.

User scoped custom dimension

You could use a User Scoped Custom Dimension to identify the current user. Note: this would really only work for users who had previously visited your site. New users to your site would not yet have their data processed and populated.

Authentication

You would need to set up service account authentication for you php implementation. Remember to add the service account to the appropriate view you wish to query.

Implementation

Your web server would have to keep track the the current users custom dimension query the API for various interest dimensions and your chosen date range and metrics. From the response of the API you web application could then make a choice as to what types of advertisements to show the current user.