views:

88

answers:

2

I would like to have a div on my companies website that is filled with links to our most-visited pages dynamically by querying our google analytics account. From everything I've been looking at in the DataExport API though, it seems like the user viewing the site has to authenticate. Am I missing something?

+1  A: 

You could add a server side script that grabs your analytics data using the api and write some javascript that inserts it into the div.

There are a number of different client libraries for google analytics you could use.

BaroqueBobcat
+2  A: 

This is correct: google analytics only supplies exported data to an authenticated user (you wouldn't want it otherwise after all, with your competitors peeking at your data, right?-).

You can run the application querying analytics separately, with all required authentication, and have that application supply such data selectively to "your company's website" with whatever level of validation you think is warranted (to avoid snooping competitors) -- if the exact subset of data that you supply (just most-visited pages, for example) is not sensitive according to your judgment, you may in fact get away without the "validation" part!-).

Alex Martelli