Created
April 15, 2015 07:45
-
-
Save IronistM/a2da88155a911dd3f5da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT type, tagcount, ROUND(ratio*10000)/100 as percent FROM ( | |
SELECT | |
COUNT(DISTINCT(pageid)) tagcount, | |
RATIO_TO_REPORT(tagcount) OVER() AS ratio, | |
CASE | |
WHEN url CONTAINS "google-analytics.com" THEN "Google Analytics" | |
WHEN url CONTAINS "piwik" then "Piwik" | |
WHEN url CONTAINS "webtrends" then "WebTrends" | |
WHEN url CONTAINS "s_code" then "Omniture" | |
WHEN url CONTAINS "ntpagetag" THEN "Unica" | |
WHEN url CONTAINS "i.kissinsights" then "KISS" | |
WHEN url CONTAINS "chartbeat.com" then "chartbeat" | |
WHEN url CONTAINS "insights.gravity.com" then "gravity" | |
WHEN url CONTAINS "cdn.optimizely.com" then "optimizely" | |
WHEN url CONTAINS "quantserve.com" then "Quantcast" | |
WHEN url CONTAINS "owa.tracker" then "OpenWebAnalytics" | |
WHEN url CONTAINS "static.getclicky.com" then "Clicky" | |
WHEN url CONTAINS "cdn.mxpnl.com" then "Mixpanel" | |
WHEN url CONTAINS ".addthis.com" then "AddThis" | |
WHEN url CONTAINS "scorecardresearch.com" then "ComScore" | |
WHEN url CONTAINS "sitestat.com" then "ComScore" | |
WHEN url CONTAINS "sitespect" then "Sitespect" | |
END as type | |
FROM [httparchive:runs.latest_requests] | |
GROUP BY type | |
HAVING type IS NOT NULL | |
ORDER BY tagcount desc | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment