Our core traffic metrics are based on data collected with cooperation of online publishers participating in Quantcast Measurement. Joining the program is a self-service process done through our web site. Anyone wishing to join registers for a free account. Once logged in, they have access to an HTML tag similar to this one:
<!-- Quantcast Tag, part 1 -->
<script type="text/javascript">
var _qevents = _qevents || [];
(function() {
var elem = document.createElement('script');
elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js";
elem.async = true;
elem.type = "text/javascript";
var scpt = document.getElementsByTagName('script')[0];
scpt.parentNode.insertBefore(elem, scpt);
})();
</script>
<!-- Quantcast Tag, part 2 -->
<script type="text/javascript">
_qevents.push( { qacct:"p-test123"} );
</script>
<noscript>
<div style="display: none;"><img src="//pixel.quantserve.com/pixel/p-test123.gif" height="1" width="1" alt="Quantcast"/></div>
</noscript>
The tag contains a “p-code” that is unique to this quantcast.com account and allows us to associate viewed content with its owner and credit traffic appropriately. Publishers copy and paste their single tag into all HTML pages on all media they wish us to measure, usually in a common footer template. Profiles on quantcast.com are visible to the public, and the owner of a Quantified site has the ability to configure what the public sees—-to change the site description, or show or hide certain parts of the data, for example. We establish ownership of a profile by scanning the main frame of the home page of that domain for his tag. If we find it, we record the user initiating the scan as the owner of the domain and credit its traffic differently than we would have otherwise. The same rules apply equally to subdomains and top-level domains. Thus the author of myblog.wordpress.com can Quantify it despite not having write access to wordpress.com’s home page. We would record her as owner of myblog.wordpress.com, independent of the Quantification status of wordpress.com as a whole. A page can be multiply tagged with different publishers’ p-codes and commonly is when a site and ads appearing on it are independently Quantified by different publishers. We credit that page’s traffic to each publisher independently, but only the one who has scanned his tag on the home page has permission to configure his Quantcast profile.
Flash Tagging
The procedure for tagging Flash media is the same in principle but more technically involved than tagging HTML. A publisher tagging Flash content downloads Quantcast’s Actionscript tag and makes programming changes to their own Flash code to incorporate it and call it, identifying themselves with their p-code. The tag and instructions for using it are downloadable from quantcast.com.
Observing Media Consumption
When someone loads a web page or other media bearing a Quantcast tag into their browser, the browser will request an invisible, one-pixel image from Quantcast’s servers. The request will be routed to the closest of our dozen data centers distributed around the world and will be answered by one of our pixel servers–lightweight web servers specially tuned for speed. Collectively they can deliver more than 20 billion pixels per day.
During the pixel transaction we request the browser to store a randomly generated number in a Quantcast cookie on the user’s machine. The browser may or may not store the cookie depending on its capabilities and settings. Assuming it did, on subsequent requests it will send this number back to us. The number allows us to tell whether we’ve seen this browser before, and to count the distinct cookies associated with a site’s traffic. When responding to the pixel request, we record a log entry containing the time, the browser’s IP address, the URL of the page containing our tag, the Quantified Publisher ID, the cookie ID (if any), and other standard web server log data.
Our current policy is to retain logs indefinitely. We don’t collect personally identifiable information about visitors to web sites. Flash tags work similarly to HTML tags. Publishers instrumenting Flash media for measurement download our Actionscript tag and modify their Flash code to call its API to report events to us. This is a more complex implementation than the HTML tag, and we work closely with publishers to ensure it is done correctly. If browsers or proxy servers were to serve our measurement pixel from their own cache, news of the event would never reach our servers, and we would under-report traffic.
Accordingly both our Flash and HTML tags use multiple cache-busting techniques, including HTTP headers to disallow caching and, when technically possible, random numbers embedded in our request URL.