Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
61f6945
chore(config): enable ecommerce chapter
amandeepsinghvirdi Jan 13, 2026
f69a5ea
chore(contributors): add Amandeep Singh
amandeepsinghvirdi Jan 13, 2026
9333e0e
chore(config): update ecommerce publish date
amandeepsinghvirdi Jan 13, 2026
b593aae
feat(ecommerce): refresh 2025 chapter content
amandeepsinghvirdi Jan 13, 2026
1cbd21b
chore(ecommerce): align 2025 metadata
amandeepsinghvirdi Jan 13, 2026
36acae0
Initial edit
tunetheweb Jan 13, 2026
890ef15
Take images
tunetheweb Jan 13, 2026
b7cecfb
Optimised images with calibre/image-actions
github-actions[bot] Jan 13, 2026
f317eee
More edits
tunetheweb Jan 13, 2026
8645f97
Merge branch 'ecommerce-2025' of github.com:HTTPArchive/almanac.httpa…
tunetheweb Jan 13, 2026
7dfd8a7
Update ecommerce adoption and platform share stats
amandeepsinghvirdi Jan 13, 2026
3eef1de
Refresh ecommerce CWV and Lighthouse data
amandeepsinghvirdi Jan 13, 2026
f816774
Update payment provider figures and tables
amandeepsinghvirdi Jan 13, 2026
92dca50
Ecommerce 2025 SQL queries (#4354)
tunetheweb Jan 14, 2026
89e880c
Merge branch 'main' into ecommerce-2025
tunetheweb Jan 14, 2026
188d17c
Fix queries for 2025
tunetheweb Jan 14, 2026
44fbf58
Merge branch 'main' into ecommerce-2025
tunetheweb Jan 14, 2026
5ed2806
More queries
tunetheweb Jan 14, 2026
2c5b422
Merge branch 'ecommerce-2025' of github.com:HTTPArchive/almanac.httpa…
tunetheweb Jan 14, 2026
199fdaf
Update more numbers to July
tunetheweb Jan 15, 2026
a4904a0
More table updates
tunetheweb Jan 15, 2026
ed272ef
docs: clarify Lighthouse comparison limitations in ecommerce guide
amandeepsinghvirdi Jan 15, 2026
b466913
docs: update ecommerce stats to display as percentages instead of abs…
amandeepsinghvirdi Jan 15, 2026
fdc5380
Update date
tunetheweb Jan 15, 2026
c00c3e9
Merge branch 'main' into ecommerce-2025
tunetheweb Jan 15, 2026
6dda3fd
Merge branch 'main' into ecommerce-2025
amandeepsinghvirdi Jan 15, 2026
a40f14a
Merge branch 'main' into ecommerce-2025
tunetheweb Jan 15, 2026
6c179b9
Add doi
tunetheweb Jan 15, 2026
7a07aad
Final edits
tunetheweb Jan 15, 2026
9373c0a
Retake images
tunetheweb Jan 15, 2026
01473ee
Add one more query
tunetheweb Jan 15, 2026
f1336b1
Optimised images with calibre/image-actions
github-actions[bot] Jan 15, 2026
f8d075c
Update featured stats
tunetheweb Jan 15, 2026
a25071a
Optimised images with calibre/image-actions
github-actions[bot] Jan 15, 2026
4023205
Merge branch 'main' into ecommerce-2025
tunetheweb Jan 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions sql/2025/ecommerce/core_web_vitals_by_platform-yoy.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#standardSQL
# CrUX Core Web Vitals performance of Ecommerce vendors by device (fid was upated to inp, and is non optinal now)
CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good / (good + needs_improvement + poor) >= 0.75
);

CREATE TEMP FUNCTION IS_NON_ZERO(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good + needs_improvement + poor > 0
);


SELECT
date,
client,
ecomm,
COUNT(DISTINCT origin) AS origins,
# Origins with good LCP divided by origins with any LCP.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))
) AS pct_good_lcp,

# Origins with good INP divided by origins with any inp.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))
) AS pct_good_inp,

# Origins with good CLS divided by origins with any CLS.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))
) AS pct_good_cls,

# Origins with good LCP, inp, and CLS divided by origins with any LCP, inp, and CLS.
SAFE_DIVIDE(
COUNT(DISTINCT IF(
IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND
IS_GOOD(fast_inp, avg_inp, slow_inp) AND
IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL
)),
COUNT(DISTINCT IF(
IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND
IS_NON_ZERO(fast_inp, avg_inp, slow_inp) AND
IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL
))
) AS pct_good_cwv
FROM
`chrome-ux-report.materialized.device_summary`
JOIN (
SELECT DISTINCT
date,
client,
root_page,
tech.technology AS ecomm
FROM
`httparchive.crawl.pages`,
UNNEST(technologies) AS tech,
UNNEST(tech.categories) AS category
WHERE
date = '2025-07-01' AND
category = 'Ecommerce' AND
(
tech.technology != 'Cart Functionality' AND
tech.technology != 'Google Analytics Enhanced eCommerce'
)
)
ON
CONCAT(origin, '/') = root_page AND
IF(device = 'desktop', 'desktop', 'mobile') = client AND
date
WHERE
date = '2025-07-01'
GROUP BY
client,
ecomm
ORDER BY
origins DESC
75 changes: 75 additions & 0 deletions sql/2025/ecommerce/core_web_vitals_by_platform.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#standardSQL
# CrUX Core Web Vitals performance of Ecommerce vendors by device (fid was upated to inp, and is non optinal now)
CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good / (good + needs_improvement + poor) >= 0.75
);

CREATE TEMP FUNCTION IS_NON_ZERO(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good + needs_improvement + poor > 0
);


SELECT
client,
ecomm,
COUNT(DISTINCT origin) AS origins,
# Origins with good LCP divided by origins with any LCP.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))
) AS pct_good_lcp,

# Origins with good INP divided by origins with any inp.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))
) AS pct_good_inp,

# Origins with good CLS divided by origins with any CLS.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))
) AS pct_good_cls,

# Origins with good LCP, inp, and CLS divided by origins with any LCP, inp, and CLS.
SAFE_DIVIDE(
COUNT(DISTINCT IF(
IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND
IS_GOOD(fast_inp, avg_inp, slow_inp) AND
IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL
)),
COUNT(DISTINCT IF(
IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND
IS_NON_ZERO(fast_inp, avg_inp, slow_inp) AND
IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL
))
) AS pct_good_cwv
FROM
`chrome-ux-report.materialized.device_summary`
JOIN (
SELECT DISTINCT
client,
root_page,
tech.technology AS ecomm
FROM
`httparchive.crawl.pages`,
UNNEST(technologies) AS tech,
UNNEST(tech.categories) AS category
WHERE
date = '2025-07-01' AND
category = 'Ecommerce' AND
(
tech.technology != 'Cart Functionality' AND
tech.technology != 'Google Analytics Enhanced eCommerce'
)
)
ON
CONCAT(origin, '/') = root_page AND
IF(device = 'desktop', 'desktop', 'mobile') = client
WHERE
date = '2025-07-01'
GROUP BY
client,
ecomm
ORDER BY
origins DESC
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#standardSQL
# CrUX Core Web Vitals performance of Ecommerce vendors by device (fid was upated to inp, and is non optinal now)
CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good / (good + needs_improvement + poor) >= 0.75
);

CREATE TEMP FUNCTION IS_NON_ZERO(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good + needs_improvement + poor > 0
);


SELECT
client,
ecomm,
COUNT(DISTINCT origin) AS origins,
# Origins with good LCP divided by origins with any LCP.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(fast_lcp, avg_lcp, slow_lcp), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp), origin, NULL))
) AS pct_good_lcp,

# Origins with good INP divided by origins with any inp.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(fast_inp, avg_inp, slow_inp), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(fast_inp, avg_inp, slow_inp), origin, NULL))
) AS pct_good_inp,

# Origins with good CLS divided by origins with any CLS.
SAFE_DIVIDE(
COUNT(DISTINCT IF(IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL)),
COUNT(DISTINCT IF(IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL))
) AS pct_good_cls,

# Origins with good LCP, inp, and CLS divided by origins with any LCP, inp, and CLS.
SAFE_DIVIDE(
COUNT(DISTINCT IF(
IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND
IS_GOOD(fast_inp, avg_inp, slow_inp) AND
IS_GOOD(small_cls, medium_cls, large_cls), origin, NULL
)),
COUNT(DISTINCT IF(
IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND
IS_NON_ZERO(fast_inp, avg_inp, slow_inp) AND
IS_NON_ZERO(small_cls, medium_cls, large_cls), origin, NULL
))
) AS pct_good_cwv
FROM
`chrome-ux-report.materialized.device_summary`
JOIN (
SELECT DISTINCT
client,
root_page,
app AS ecomm
FROM
`httparchive.crawl.pages`,
UNNEST(technologies) AS tech,
UNNEST(categories) AS category
WHERE
date = '2025-07-01' AND
category = 'Ecommerce' AND
(
technology != 'Cart Functionality' AND
technology != 'Google Analytics Enhanced eCommerce'
)
)
ON
CONCAT(origin, '/') = root_page AND
IF(device = 'desktop', 'desktop', 'mobile') = client
WHERE
date = '2025-07-01'
GROUP BY
client,
ecomm
ORDER BY
origins DESC
49 changes: 49 additions & 0 deletions sql/2025/ecommerce/counts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
SELECT
client,
date,
EXTRACT(YEAR FROM date) AS year,
rank_grouping,
CASE
WHEN rank_grouping = 100000000 THEN 'all'
ELSE FORMAT("%'d", rank_grouping)
END AS ranking,
COUNT(DISTINCT root_page) AS ecommerce_sites,
total,
COUNT(DISTINCT root_page) / total AS pct_ecommerce
FROM
`httparchive.crawl.pages`,
UNNEST(technologies) AS technologies,
UNNEST(technologies.categories) AS cats,
UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS rank_grouping
JOIN (
SELECT
date,
client,
rank_grouping,
COUNT(DISTINCT root_page) AS total
FROM
`httparchive.crawl.pages`,
UNNEST([1000, 10000, 100000, 1000000, 10000000, 100000000]) AS rank_grouping
WHERE
date IN ('2025-07-01', '2024-06-01', '2023-07-01', '2022-06-01', '2025-07-01') AND
rank <= rank_grouping
GROUP BY
date,
client,
rank_grouping
)
USING (date, client, rank_grouping)
WHERE
date IN ('2025-07-01', '2024-06-01', '2023-07-01', '2022-06-01', '2025-07-01') AND
rank <= rank_grouping AND
cats = 'Ecommerce' AND
technologies.technology NOT IN ('Cart Functionality', 'Google Analytics Enhanced eCommerce')
GROUP BY
date,
client,
rank_grouping,
total
ORDER BY
date DESC,
client,
rank_grouping
44 changes: 44 additions & 0 deletions sql/2025/ecommerce/median_lighthouse_score_ecommsites.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
WITH totals AS (
SELECT
client,
COUNT(DISTINCT page) AS total_webpages,
COUNT(DISTINCT root_page) AS total_websites
FROM
`httparchive.crawl.pages`
WHERE
date = '2025-07-01'
GROUP BY
client
)

SELECT
client,
technology,
ARRAY_AGG(DISTINCT category) AS categories,
APPROX_QUANTILES(CAST(JSON_VALUE(lighthouse.categories.performance.score) AS NUMERIC) * 100, 1000)[OFFSET(500)] AS median_performance,
APPROX_QUANTILES(CAST(JSON_VALUE(lighthouse.categories.accessibility.score) AS NUMERIC) * 100, 1000)[OFFSET(500)] AS median_accessibility,
APPROX_QUANTILES(CAST(JSON_VALUE(lighthouse.categories.seo.score) AS NUMERIC) * 100, 1000)[OFFSET(500)] AS median_seo,
APPROX_QUANTILES(CAST(JSON_VALUE(lighthouse.categories.`best-practices`.score) AS NUMERIC) * 100, 1000)[OFFSET(500)] AS median_best_practices,
ANY_VALUE(total_websites) AS total_websites,
COUNT(DISTINCT root_page) AS number_of_websites,
COUNT(DISTINCT root_page) / ANY_VALUE(total_websites) AS percent_of_websites
FROM
`httparchive.crawl.pages`,
UNNEST(technologies) AS tech,
UNNEST(categories) AS category
INNER JOIN
totals
USING (client)
WHERE
date = '2025-07-01' AND
category = 'Ecommerce' AND
(
technology != 'Cart Functionality' AND
technology != 'Google Analytics Enhanced eCommerce'
)
GROUP BY
client,
technology
ORDER BY
client,
number_of_websites DESC
Loading
Loading