Skip to content

Commit

Permalink
Merge pull request #84 from GoogleChromeLabs/add/embed-blocks-on-root…
Browse files Browse the repository at this point in the history
…-and-non-root-pages
  • Loading branch information
swissspidy authored Feb 4, 2024
2 parents c2d97c2 + 769148d commit 6cd2e10
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions sql/2024/01/embed-blocks-on-root-and-non-root-pages.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# HTTP Archive query to get scripts blocking in head, counted by plugin.
#
# WPP Research, Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# See query results here: https://github.com/GoogleChromeLabs/wpp-research/pull/84

SELECT
is_root_page,
JSON_EXTRACT(custom_metrics, '$.cms.wordpress.has_embed_block') AS has_embed_block,
COUNT(*) AS page_count,
ROUND(100.0 * COUNT(*) / SUM(COUNT(*)) OVER (), 1) AS percentage_of_total
FROM
`httparchive.all.pages`,
UNNEST(technologies) AS technology
WHERE
date = CAST('2023-12-01' AS DATE)
AND technology.technology = 'WordPress'
GROUP BY
has_embed_block,
is_root_page
ORDER BY percentage_of_total DESC
1 change: 1 addition & 0 deletions sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ For additional considerations for writing BigQuery queries against HTTP Archive,
### 2024/01

* [TTFB of localized WordPress sites](./2024/01/ttfb-localized-sites.sql)
* [Embed blocks on root and non-root pages](./2024/01/embed-blocks-on-root-and-non-root-pages.sql)

### 2023/10

Expand Down

0 comments on commit 6cd2e10

Please sign in to comment.