Skip to main content
Skip table of contents

API Call Events

These events are used to track the status (success, failure) and latency of calls to backend APIs.

Interaction

Data Layer

GA Tag

Started call to backend API

JS
{
     event: 'api_call',
     api-name: 'View Claims and Appeals',
     api-status: 'started',
     api-latency-ms: 20000,
     api-request-id: "55d07138-4056-405f-b361-e03ef56a386e"
}

Event Action:
API Request - {{DL - api-name}} - {{DL - api-status}}

Custom Dimension:
142 - API Request ID

Custom Metric:
51 - API latency (ms)

Successful call to backend API

JS
{
     event: 'api_call',
     api-name: 'View Claims and Appeals',
     api-status: 'successful'
     api-latency-ms: 20000,
     api-request-id: "55d07138-4056-405f-b361-e03ef56a386e"
}

Event Action:
API Request - {{DL - api-name}} - {{DL - api-status}}

Custom Dimension:
142 - API Request ID

Custom Metric:
51 - API latency (ms)

Failed call to backend API

JS
{
     event: 'api_call',
     api-name: 'View Claims and Appeals',
     api-status: 'failed',
    'error-key': '500 timeout message'
     api-latency-ms: 20000,
     api-request-id: "55d07138-4056-405f-b361-e03ef56a386e"
}

Event Action:
API Request - {{DL - api-name}} - {{DL - api-status}}

Custom Dimension:
142 - API Request ID

Custom Metric:
51 - API latency (ms)


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.