Using Multiple IDs in a Tag

Quantcast Advertise - Quantcast Advertise Methodology

Using Multiple IDs in a Tag

This document describes how you can consolidate two Quantcast tags with different IDs (p-codes) into one tag. For example, if you wanted to aggregate reporting on a network of blogs, while still allowing individual blogs owner to have full control (public visibility settings, site descriptions, access controls, etc) over Quantcast profiles, the technique shown here is useful.

Publishers wishing to consolidate two Quantcast tags can use a modified version of the standard Quantcast tag as shown below. In this example, the first set of _qoptions could belong to the blog network operator, whereas the second could belong to the individual blog owners.

<!-- Quantcast Tag -->
<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>
<script type="text/javascript">
    _qevents.push([{
        qacct:"p-12345abcde", // Value of the Network operator's account ID, this stays static across sites 
        labels:"Technology" // Label attributed to network operators Quantcast Publisher profile 
    },
    { 
        qacct:"p-678910abcde", // Individual blog owner's account ID 
        labels:"Technology" // Label attribtued to individual owner's Quantcast Publisher profile 
    }]);
</script>
<noscript>
    <div style="display:none;">
        <img src="//pixel.quantserve.com/pixel?a.1=p-12345abcde&a.2=p-678910abcde&labels=Technology" 
        border="0" height="1" width="1" alt="Quantcast"/>
    </div>
</noscript>
<!-- End Quantcast tag -->

 

Labels in each set can be the same, different, or omitted all together. Blogs that are not measured via Quantcast can obtain their own ID (p-code) by creating a free account.

The result of the above tag would be traffic being equally attributed to the sample account IDs p-12345abcde and p-678910abcde , both of which would contain the label ‘Technology’. This occurs in a single request to Quantcast.

More information on using audience segments.

Learn more about our advertising solutions.