Quantcast Destination

Segment makes it easy to send your data to Quantcast (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Quantcast in the format they understand. Learn more about how to use Quantcast with Segment.

We have both web and mobile destinations with Quantcast. The two integrations are outlined below. Our Quantcast destination code is also open source on Github. Feel free to check it out: analytics-ios-integration-quantcast, analytics.js-integration-quantcast.

Web Destination

When you toggle on Quantcast for a website in Segment, this is what happens:

  • Our CDN is updated within 5-10 minutes. Then our snippet will start asynchronously loading quant.js onto your page. This means you should remove Quantcast’s snippet from your page.
  • Quantcast will automatically start recording data. If this is the first time sending data to Quantcast it can take them up to 12 days to process your new data.

Quantcast supports the identify and track methods on our API.

Note: For Quantcast to load you must call our page method. There is a call to page in your javascript snippet by default, so as long as you don’t remove it Quantcast will load whenever your snippet loads!


When you call .page(), we will automatically pass the labels. See below for details.


When you call .identify() with a userId, we’ll stringify it and pass it to Quantcast. This allows you to accurately measure your audience size across multiple platforms and devices.


Our .track() method will append Quantcast labels automatically. See below for details.

Order ID

When you call .track() and include a property labeled orderId and revenue according to our spec, we will pass that along to Quantcast in the format they expect.

Order Completed

For purchase events, you should send an event called Order Completed per our spec seen here that includes properties of order_id and total in dollars (eg 16.50, representing the order total, including taxes and fees). If you don’t use a total property, you can pass revenue - and note that if you pass both as properties, total takes precedence. If available, you should also include properties of category and repeat with a value of true or false indicating whether or not the visitor is new or returning. This will cause the appropriate Quantcast custom lables to be populated properly.



When you call page, track or screen, we’ll pass the page name, event name or screen name and the category (if provided) to Quantcast as a label. The standard label will look like this ““ for page or screen, and “<name>“ for track events. If you enable Quantcast for advertisers then we’ll send “_fp.event.<name>“ to match Quantcast’s internal data structures for advertisers. If you do not pass any <code>category</code> or <code>name</code> for a <code>.page()</code> call, we will fallback on Quantcast’s default label.</name></name>

Here’s an example for Quantcast Advertisers:

analytics.page('Blog'); // sends label _fp.event.Blog
analytics.page(); /// sends default label _fp.event.Default

For non-advertisers:

analytics.page('Blog'); // sends label "Blog"
analytics.page(); // does not send any label

If you opt to send multiple custom labels, you can do so in a few ways. You can attach a property called label and define a custom label there or send them via the Quantcast.labels in the options object.

For advertisers:

analytics.page('Home', {
  label: 'customLabel'

// This will send label as _fp.event.Home,_fp.event.customLabel

analytics.page('Home', {}, {
  Quantcast: {
    labels: ['customLabel1', 'customLabel2']

// This will send label as _fp.event.Home,_fp.event.customLabel1,_fp.event.customLabel2

IMPORTANT: Labels cannot contain any special characters so we will strip them out!


Script unverified or undetected by third-party tool

Many times this is a limitation on the tool’s detection process, where the detector is looking for a specific HTML element on your page. Our client side analytics.js library asynchronously loads the tool’s library or pixel onto the page. As such, the detection fails.

In order to confirm that the tool’s library or pixel is actually loaded onto the page, you can open up the javascript console and go to the network tab when the page is loading.

Checking network tab to see if script loads

If the script isn’t loading, check that any form of ad blocker is disabled.

Mobile Destination

When you toggle on Quantcast for a mobile app in Segment, this is what happens:

  • Follow the instructions on the Quantcast sheet on the destinations page for adding the packaged Quantcast SDK (a simple one-liner to add to your Podfile).
  • After you build and release to the app store, we’ll automatically start translating and sending your data to Quantcast. If this is the first time sending data to Quantcast it can take them up to 12 days to process your new data.


When you call identify with a userId, we’ll pass that to Quantcast. This allows you to accurately measure your audience size across multiple platforms and devices.


When you call track we’ll automatically log the events to Quantcast.


When you call screen we’ll automatically log an event like Viewed ABC Screen to Quantcast.

Other Features


The destination does not currently support labels. If this is important to you, please let us know.

Supported Sources and Connection Modes

📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.

This destination requires a Device-based Connection Mode for Mobile data. Follow the steps above to ensure you have packaged the Quantcast SDK with Segment’s.


Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

By default data will be sent to Quantcast Measure, enable this option to send to Quantcast Advertise

When sending data for eCommerce events, Segment will also include labels corresponding to the products included in the event.


Only required for mobile apps. You can find your API Key in the right-hand column under Your API Key after you login to Quantcast.


You can find your P-Code in the right-hand column under Your P-Code after you login to Quantcast.

Questions? Need help? Contact us!
Can we improve this doc?
Email us: docs-feedback@segment.com!