Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to track downloads from my site -- how?
#1
I need to track downloads of a particular file posted on my site. I have the google analytics plugin, but it doesn't track the downloads. Help!

I need to get this up and running quickly.
Reply
#2
You can never know for sure that the user has downloaded a file without any issues.

Maybe you will need to force the file download with PHP using header(), something like this:

Code:
...
header("Content-Type: $type");
header("Content-Transfer-Encoding: Binary");
header("Content-Length:".filesize($location));
header("Content-Disposition: attachment; filename=\"$file\"");
readfile($location);
...
    
And what you can do is to implement an additional step that must be executed after the file is successfully downloaded then you can track that step.
Reply
#3
Perhaps with the Hitcount and Download Interceptor plugins...
Reply
#4
(2016-10-28, 03:18:27)Thanks, but I don\t need to know about successful downloads, just attempts. Bigin Wrote: You can never know for sure that the user has downloaded a file without any issues.

Maybe you will need to force the file download with PHP using header(), something like this:


Code:
...
header("Content-Type: $type");
header("Content-Transfer-Encoding: Binary");
header("Content-Length:".filesize($location));
header("Content-Disposition: attachment; filename=\"$file\"");
readfile($location);
...
    
And what you can do is to implement an additional step that must be executed after the file is successfully downloaded then you can track that step.
Reply
#5
More infos
How to Track Downloads in Google Analytics:
http://www.blastam.com/blog/how-to-track...-analytics

I didn't know the plugins that Carlos mentioned before, but if you are familiar with PHP see here the second Answer:
http://stackoverflow.com/questions/12295...oad-script

Or you can try this script: 
https://github.com/iNamik/PHP-Download-Tracker
Reply
#6
http://get-simple.info/extend/plugin/piw...ation/920/
http://get-simple.info/extend/plugin/goo...ytics/749/

I didn't test those
Reply




Users browsing this thread: 1 Guest(s)