Chrome dev tools: inspect network tab using Javascript from console tab

1.6k views Asked by At

Sometimes, users of my website report an issue with an ad but the screenshot is not enough to identify the ad provider and digging into DOM tree using Chrome dev tool's Elements tab is quite difficult for a non-tech user & DOM elements may vary depending on the ad provider.

What I can ask every user is to open Chrome dev tools and execute a javascript code into the Console. This piece of javascript would have to extract content from the Network tab (I need the HTTP response to a specific HTTP request).

Is that possible with pure javascript & chrome API (without developing a Chrome extension)?

1

There are 1 answers

0
Apoorv Saxena On

Copying the complete network activity of the creative since the beginning is not possible in case Chrome Dev tools were not open already as it only starts recording the network activity when it is open.

It's no point asking them to reload the page while enabling Chrome Dev tools as it's very probable for the ad to change on reload.

Though depending upon the ad tag that you make use of, check for the JS code which will return you the ad creative id and other details related to the ad to help you take suitable action against the ad later.