I have been researching this for hours and I cant seem to find an answer to this. For people that know cURL this is going to seem like a dumb question but answering this will probably help a lot of people. I am trying to use Google Analytics to post custom SEO reports and the best way seems to be using XML. The sample code they give is posted below:
#!/bin/bash # # Copyright 2009 Google Inc. All Rights Reserved # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Access the Data Feed of the GA Data Export API through cURL USER_EMAIL="" #Insert your Google Account email address here USER_PASS="" #Insert your password here TABLE_ID="" #Insert your table ID here (ie ga:1234) googleAuth="$(curl https://www.google.com/accounts/ClientLogin -s \\ -d Email=$USER_EMAIL \\ -d Passwd=$USER_PASS \\ -d accountType=GOOGLE \\ -d source=curl-dataFeed-v2 \\ -d service=analytics \\ | awk /Auth=.*/)" feedUri="https://www.google.com/analytics/feeds/data\\ ?ids=$TABLE_ID\\ &start-date=2008-10-01\\ &end-date=2008-10-31\\ &dimensions=ga:source,ga:medium\\ &metrics=ga:visits,ga:bounces\\ &sort=-ga:visits\\ &filters=ga:medium%3D%3Dreferral\\ &max-results=5\\ &prettyprint=true" curl $feedUri --silent \\ --header "Authorization: GoogleLogin $googleAuth" \\ --header "GData-Version: 2"
The problem is I have no idea what file extension to use for this code and how do I call this information on a web page? Does anyone know the answer to this?