Network Inspector: What sets it apart
By creating any scenario you can simulate full user journeys on web (e.g., login, cookie acceptance, clicking fields) using a WebKit-based browser engine; native app scenarios are not supported in the same way.
Whereas the Data Layer Guard functionality checks the full DOM and any front-end JSON objects, the Network Inspector enables deep network-level inspection of HTTP-, XHR requests and WebSockets, including custom headers and endpoints. The purpose is to monitor analytics data and HTTP requests in the network layer distinct from the DOM-level Data Layer Guard.
Technical Overview: DataLayer vs. Network Layer Monitoring
1. Architectural Distinction The primary difference between these two systems lies in the Data Source. While both serve the purpose of validating analytics and application health, they intercept data at different points in the browser's architecture.
2. Different logic
The logic between DataLayer Guard and Network Inspector differs:
- DataLayer Guard: Focuses on the presence of specific keys and values within the JSON objects pushed to the dataLayer (e.g., checking if
event: "page_view"exists). - Network Inspector: Focuses on the "health" of the communication. This includes:
- Status Code Verification: Ensuring the request returns a
200 OKor other expected status. - Header Validation: Confirming that mandatory HTTP headers are present and contain correct metadata.
- Payload Inspection: Verifying the data being sent directly to the analytics server before it is processed.