0

I am trying to get data from a website. After trying different approaches I figured the website is using js to render itself so for that reason I am getting no results.

I've used =IMPORTXML("https://website.com/","html") and I got this as a proof:

"function 
gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag(""js"",new 
Date),gtag(""config"",""UA-235635761-1"")function 
gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag(""js"",new 
Date),gtag(""config"",""G-Y8DS8XZ3TZ"")website"

So Google Sheets is getting no results because there is no html or any tags. When I open the page on the browser it loads normally and I can see the tag I am looking for.

Is there any way to overcome this? I was thinking maybe saving the html first in a gdrive folder then using importxml. Any tips?

Rubén
  • 34,714
  • 9
  • 70
  • 166
RodMorais
  • 35
  • 3
  • See [How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website?](https://webapps.stackexchange.com/q/115664/88163) – Rubén Sep 10 '22 at 00:33

0 Answers0