> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# UXDR Analytics

The UXDR Analytics pipeline collects, organizes, and makes available CRUD events on the entities. For example, the UXDR Analytics pipeline captures every instance when a user updates their information (update the User entity), signs in with a new runtime (create the Runtime entity), or adds an external subscription to their User ID (create the Subscription entity and associates it to the User entity).

Merchants can consume data from this pipeline for business intelligence purposes. They can also use HTTP Trace or Database Snapshot to query the data for their analytics.

## HTTP Trace

TRACE is an HTTP request method used for debugging which returns input back to the user.

Storefront Gateway collects the following information on each HTTP request in the JSON format:

* Path
* Query parameters
* Headers
* Request and response payload limited (truncated) to 1 KB
* Context (Note that this could be null for certain APIs)
  * User identifier
  * Session identifier (based on access token or session id)
  * Runtime identifier
* HTTP response code
  * In case of an error response, payload limited (truncated) to 1 KB

**Example use cases**

* Reviewing all error calls and locate source of issue.
* Reviewing usage information such as what APIs were called most frequently and by whom.
* Understanding overall lifecycle of a user such as when the user logged in, changed their profile, updated their custom data.

Some notable points of the data in HTTP Trace request are:

* This data offers insight into request latency, request/response body, error status, and many more.
* Sensitive and personal information such as credentials, OAuth client secrets, cookies, and more are excluded from the trace logs.
* Daily trace data is available for consumption through SSH File Transfer Protocol (SFTP).

**Sample HTTP Trace Request**

```
{
  "timestamp":1635203423942,
  "request": {
    "method":"PATCH",
    "uri":"https://abc.m1amdocs.com/customData/v1/user/8911111",
    "headers": {
      "content-length": [
        "63"
      ],
      "x-forwarded-proto": [
        "https"
      ],
      "x-tenant-id": [
        "nxt"
      ],
      "x-frame-options": [
        "DENY;"
      ],
      "x-forwarded-port": [
        "443"
      ],
      "strict-transport-security": [
      "\"max-age=15768000\";"
      ],
      "x-real-ip": [
        "173.175.27.35"
      ],
      "content-security-policy": [
        "\"default-src 'self'; script-src 'self' https://ssl.google-analytics.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com; style-src 'self'
        https://fonts.googleapis.com; font-src 'self' https://themes.googleusercontent.com; https://www.facebook.com https://s-static.ak.facebook.com; object-src 'none'\";"
      ],
      "x-amzn-trace-id": [
        "Root=1-6177395f6ea822221d62674957967f72"
      ],
      "x-content-type-options":[
        "nosniff;"
      ],
      "x-xss-protection": [
        "\"1; mode=block\";"
      ],
      "x-forwarded-host": [
        "nxt.m1amdocs.com"
      ],
      "x-forwarded-prefix": [
        "/customData/"
      ],
      "referrer-policy": [
         "no-referrer-when-downgrade;"
      ],
      "host": [
        "idp.sensical.tv"
      ],
      "content-type": [
        "application/json; charset=utf-8"
      ],
      "connection": [
        "keep-alive"
      ],
      "accept-encoding": [
        "gzip"
      ],
      "user-agent": [
        "Dalvik/2.1.0 (Linux; U; Android 9.0; tablet Build/NRD90M)"
      ]
    },
    "remoteAddress":"173.175.27.35",
    "body":"{
      \"timeWatched\":{
        \"duration\":3640000,
        \"lastUpdate\":1635153083186
      }
    }",
    "parameters":null
  },
  "response": {
    "status":204,
    "headers": {
      "X-Tenant-ID": [
        "nxt"
      ],
      "Vary": [
        "Origin",
        "Access-Control-Request-Method",
        "Access-Control-Request-Headers"
      ]
    },
    "body": null
  },
  "identifiers": {
    "sessionId": "fef2196ffb5e3b7646671fcf9fe7882a",
    "runtimeId":65953,
    "userId":8911111,
    "partnerId":null,
    "adminUserId":null,
    "tenantId":"nxt"
  },
  "timeTaken":23
}
```

## Database Change Logs

A database change log is a read-only, static view of the source database changes. Storefront Gateway makes change logs available from two databases: platform (includes all entities) and custom data. Daily change logs are available for consumption through SFTP.

**Example use cases**

* Run advanced queries such as:

  Get me a list of all users who have an authentication ID and have watched a show on the Custom Data topic 'Dinosaur' in the last 365 days.

  Using the results of this query, you can send a promotional email to these users to let them know about new shows about Dinosaurs.

* Understand the overall lifecycle of a user.

  This includes information on when or how they signed up, their overall login history, when they updated their profile (password reset, change display name), updated the favorites list from custom data and how, and such.

* Understand how often something has been read.

  This includes how often a user reads favorites custom data which is largely dependent on UI screens that are getting custom data for favorites information.

**Parent topic:**[UXDR Pipelines](uxdrPipelines)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.