0

I'm wondering whether Google Analytics events are fired if I'm scraping data from a webpage using VBA scraping script? I'm not using browser simulation, I'm using MSXML2.XMLhttp object with a GET request.

For example

Set XMLreq = CreateObject("MSXML2.XMLhttp")
With XMLreq

    url = "url_of_website"
    .Open "GET", url, False
    .send
    Set HTMLdoc = CreateObject("HTMLFile")
    HTMLdoc.body.innerHTML = .responseText

End With

Does this fire Google Analytics data back to the server?

Brendan Gooden
  • 1,460
  • 2
  • 21
  • 40
  • Possible duplicate of http://stackoverflow.com/questions/136682/how-to-disable-javascript-in-mshtml-htmldocument-net – NineBerry May 02 '16 at 00:04

1 Answers1

4

Using MSXML2.XMLhttp to download a web page does not trigger Google analytics events, since no JavaScript code is executed this way. But when you then load the web page into the HTMLDoc object, JavaScript can be executed and Google analytics events might be triggered depending on how Google Analytics is embedded into the web page.

NineBerry
  • 26,306
  • 3
  • 62
  • 93