Analytics Camp 2012 Using the Google Analytics API
Dean Peters is a analytics API junkie. He works for McClatchy (News & Observer owner.) Son of Web Pages that Suck author.
Most Popular Pages Widgets. You see it a lot on news media sites.
Where do they get the data? Google Analytics and Omniture.
You can do this with your blog. You need an analytics service with an API like Google Analytics. You need a programming language. He uses Perl.
Showed the GA dashboard. Showed Standard reporting and Custom reporting.
Why do you need an API? exporting from the dashboard is a process that is tedious and unsustainable. Using an API lets you automate the process. Using a programming language let’s you fine-tune the data and reports you need.
Programmatic access to Google Analytics report daa and stats.
Dimensions and Metrics
Dim are rows of data.
Metrics are columns of data.
You need to be authenticated (gmail id and password)
You need a Profile ID not the UA key
You need to filter the data.
Coding for the API
with Perl we use Net::Google::AuthSub, Profile ID Net::Google::Analytics, with Perl we use XML::FeedPP
Showed the pl code. Discussed what the parts of the Perl code did. He will post the code afterward.