# Validate Analytics Events

```javascript
const session = await client.startSession({ 
    proxy: 'intercept', // receive network requests made by device
    debug: true         // receive debug messages from device
})

// check network requests
session.on('network', (data) => {
    // intercepted network request
    if (data.type === 'request') {
        console.log(`[${data.request.method}]: ${data.request.url}`)
    } 
    
    // intercepted network response
    if (data.type === 'response' && data.request.method === 'POST') {
        console.log(data.response.postData)
    }
})

// check debug logs
session.on('log', (data) => {
    console.log(data.message)
})

await session.openUrl('scheme://example.com/deep-link-url')
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appetize.io/guides-and-samples/open-a-deeplink-and-make-sure-analytics-api-calls-happen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
