catchpoint / WebPageTest.bulk-tester

Google App Script for spreadsheet that uses the WPT API to bulk test URLs
MIT License
259 stars 22 forks source link

Problem adding Lighthouse metrics #26

Closed EGRFPMX closed 3 years ago

EGRFPMX commented 4 years ago

Hi, I want to add some lighthouse information. I activated Lighthouse, so the JSON returns the information but I am struggling to get it in to the excel.

So, for example "data.lighthouse.userAgent" gives me the user agent, and it's working.

image

But when I try to get the FCP using "data.lighthouse.audits.first-contentful-paint.numericValue", it doesn't work.

image

You can see the full JSON here: https://webpagetest.org/jsonResult.php?test=200429_MG_a5034b2456c198764ee9026c7ae3a0b0&pretty=1

Anyone can help me with this?

I don't know what I am missing :(

andydavies commented 4 years ago

It's the hyphens in first-contentful-paint that are causing the issue but I need to track down why

data.lighthouse.audits["first-contentful-paint"].numericValue works as an alternative

EGRFPMX commented 4 years ago

data.lighthouse.audits["first-contentful-paint"].numericValue

Working!!! Thanks!!!