How can I get objects in a S3 bucket?

How can I use Google Analytics to track an AWS S3 bucket?

  • I am assuming you wish to use Google Analytics to track downloads from an S3 bucket. You have three options (in order of difficulty): You can track the click leading to the download (easiest, though not practical if you do not have access to the page where the click happens); You can have an interstitial page that hits GA using JS prior to redirecting to the download (fairly easy, though the user has to wait for the GA call); You can have an interstitial server that hits GA using a server-side API SDK before redirecting to the download (the best option, though it requires some intermediate programming knowledge); P.S.: If you wondered if there was a way Amazon S3 could automatically inform Google Analytics of a download, unfortunately that is not possible at this time. S3  does not currently support an event referring to a GET operation on the bucket.

  • Answer:

    I presume that you are trying to track whether the file has actually been downloaded onto a machine. Even if do decide to run some code on S3, this will only track the start of the download. I didn't understand the part about not having access to the page where the download click happened. Are you trying to track downloads from an S3 bucket you have access to, but not the page where the link is. If so, you could use the Amazon S3 Log files to take a look at the referring source http://docs.aws.amazon.com/AmazonS3/latest/dev/LogFormat.html

Charles Meaden at Quora Visit the source

Was this solution helpful to you?

Other answers

You might be able to process the logs and send them to Google Analytics' Measurement API. I've been toying with this idea to analyze S3 access logs. I'm not entirely sure if it would really work, so if anyone has tried this, please let me know.

Sathya Sekaran

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.