Hello,
I am trying to parse the google analytics api response text but I am having trouble.
What I have been working on doing is extracting the profile information in my companies google analytics accounts.
Here's a sample of what the data looks:
{"kind":"analytics#profiles","username":"XXXX@gmail.com","totalResults":240,"startIndex":1,"itemsPerPage":1000,"items":[{"id":"XXXX","kind":"analytics#profile","selfLink":"https://www.googleapis.com/analytics/v3/management/accounts/XXXX/webproperties/UA-XXXX-1/profiles/XXX","accountId":"XXXX","webPropertyId":"UA-XXXX-1","internalWebPropertyId":"XXXX","name":"X 2","currency":"USD","timezone":"America/Los_Angeles","websiteUrl":"-","type":"WEB","created":"xxxx","updated":"xxxx","eCommerceTracking":true,"parentLink":{"type":"analytics#webproperty","href":"https://www.googleapis.com/analytics/v3/management/accounts/XXXX/webproperties/UA-XXXX-1"},"childLink":{"type":"analytics#goals","href":"https://www.googleapis.com/analytics/v3/management/accounts/XXXX/webproperties/UA-XXXX-1/profiles/XXXX/goals"}}]}
I want the data to return the accountID, webPropertyID, and name of each profile in analytics.
Any help would be greatly appreciated
I am trying to parse the google analytics api response text but I am having trouble.
What I have been working on doing is extracting the profile information in my companies google analytics accounts.
Here's a sample of what the data looks:
{"kind":"analytics#profiles","username":"XXXX@gmail.com","totalResults":240,"startIndex":1,"itemsPerPage":1000,"items":[{"id":"XXXX","kind":"analytics#profile","selfLink":"https://www.googleapis.com/analytics/v3/management/accounts/XXXX/webproperties/UA-XXXX-1/profiles/XXX","accountId":"XXXX","webPropertyId":"UA-XXXX-1","internalWebPropertyId":"XXXX","name":"X 2","currency":"USD","timezone":"America/Los_Angeles","websiteUrl":"-","type":"WEB","created":"xxxx","updated":"xxxx","eCommerceTracking":true,"parentLink":{"type":"analytics#webproperty","href":"https://www.googleapis.com/analytics/v3/management/accounts/XXXX/webproperties/UA-XXXX-1"},"childLink":{"type":"analytics#goals","href":"https://www.googleapis.com/analytics/v3/management/accounts/XXXX/webproperties/UA-XXXX-1/profiles/XXXX/goals"}}]}
I want the data to return the accountID, webPropertyID, and name of each profile in analytics.
Any help would be greatly appreciated