Reputation: 83
Is it possible to collect the names of all network requests that a site makes when it runs that are visible in browser's developer tools (for example scripts, html, etc.)? I would like to collect them with GTM tags and send them to GA as events.
Upvotes: 0
Views: 619
Reputation: 2372
Yes there is a way to do it. Have a look at this document
But looks like you are using GA to collect something like log service.
There will be many challenge when you want to do this on GTM.
The listener will fail for the requests before GTM loading.
If the website traffic grows. It will reach the free version of GA very quickly.
If the JS code goes wrong. It might affect the request loading then something will go wrong on the website.
So this requirement might define more clearly on why we want to do this. What kind of the request you want to track? Only the request from your server or 3rd party request like GA and other tracking request.
Upvotes: 1