Kirsten Lambertsen said
1 year, 1 month ago: @howwhowhen I can shed a little light on Alexa. I’m actually friends with an original Alexa team member 
Back in the 90′s Alexa offered a free browser plugin (a toolbar). That plug-in also collected browsing data which was sent back to Alexa to create its rankings. At the time it was commonly believed that Alexa had enough people using the toolbar as to be a statistically accurate sample for its rankings. It still offers the toolbar today.
Then, Alexa was purchased by Amazon, quite a few years ago. According to the Alexa website, the toolbar is still how it collects data. With millions of installs, it probably is a pretty good gauge of your overall ranking compared to other websites. However, I wouldn’t be surprised if Alexa has leveraged the unbelievable reach of Amazon to gather even more data via cookies set by Amazon. But that’s just wild speculation on my part 
So, that’s why they don’t need you to participate in any way by installing code or tags. I think the correlation between your increase in traffic and your improvement in Alexa ranking is kind of a nice little validation that Alexa rankings are fairly accurate.