Which sites are using multiple Analytics providers?

SELECT pages.pageid, url, cnt, libs, pages.rank rank FROM [httparchive:runs.2013_06_01_pages] as pages JOIN (
  SELECT pageid, count(distinct(type)) cnt, GROUP_CONCAT(type) libs FROM (
    SELECT REGEXP_EXTRACT(url, r'(ga|piwik|webtrends|s_code|ntpagetag).*\.js') type, pageid
    FROM [httparchive:runs.2013_06_01_requests]
    WHERE REGEXP_MATCH(url, r'ga|piwik|webtrends|s_code|ntpagetag.*\.js')
    GROUP BY pageid, type
  )
  GROUP BY pageid
  HAVING cnt >= 2
) as lib ON lib.pageid = pages.pageid
WHERE rank IS NOT NULL
ORDER BY rank asc

This is basically just a copy of Ilya’s earlier query and changing the regex string to look at the web analytics providers.

Very interesting in the number of sites that run both GA and another provider!

Hah, indeed - very interesting!