---
title: "Google Analytics Integrations API Reference"
description: "Send every QR code scan and link visit, form submission and piece of visitor data captured to Google Analytics 4, server side through the Measurement Protocol, with no delay for the visitor."
canonical: "https://linkbreakers.com/help/api/google-analytics-integrations"
---

# Google Analytics Integrations

Send every QR code scan and link visit, form submission and piece of visitor data captured to Google Analytics 4, server side through the Measurement Protocol, with no delay for the visitor.

## Google Analytics Integrations

## [#](#google-analytics-integrations-object)The GoogleAnalyticsIntegration object

The Google Analytics 4 property a workspace sends its visits to.

apiSecretSet

boolean

Whether a Measurement Protocol API secret is stored. The secret itself is never returned.

createdAt

string (date-time)

When the integration was connected.

lastError

string

The last error met sending events, cleared by the next success.

lastErrorAt

string (date-time)

When that error happened.

lastSentAt

string (date-time)

When an event was last accepted by Google Analytics.

measurementId

string

GA4 Measurement ID, e.g. "G-ABC123DEF4".

updatedAt

string (date-time)

When it was last changed.

Example object

```json
{
  "apiSecretSet": false,
  "createdAt": "2026-10-31T00:03:44.836Z",
  "lastError": "string",
  "lastErrorAt": "2026-10-31T00:03:44.836Z",
  "lastSentAt": "2026-10-31T00:03:44.836Z",
  "measurementId": "string",
  "updatedAt": "2026-10-31T00:03:44.836Z"
}
```

GET

`/v1/integrations/google-analytics`

Requires auth

## [#](#get-google-analytics-integration)Get Google Analytics integration

Return the Google Analytics 4 property the workspace sends its visits to, without the API secret. Requires the \`integrations:read\` scope.

### [#](#get-google-analytics-integration-parameters)Parameters

This endpoint does not accept any parameters.

### [#](#get-google-analytics-integration-response)Response

200

Everything worked as expected.

integration

object

The Google Analytics 4 property a workspace sends its visits to.

### [#](#get-google-analytics-integration-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X GET "https://api.linkbreakers.com/v1/integrations/google-analytics" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Typical response

```json
{
  "integration": {
    "apiSecretSet": false,
    "createdAt": "2026-10-31T00:03:44.836Z",
    "lastError": "string",
    "lastErrorAt": "2026-10-31T00:03:44.836Z",
    "lastSentAt": "2026-10-31T00:03:44.836Z",
    "measurementId": "string",
    "updatedAt": "2026-10-31T00:03:44.836Z"
  }
}
```

Base URL: `https://api.linkbreakers.com`

POST

`/v1/integrations/google-analytics/test`

Requires auth

## [#](#send-a-test-event-to-google-analytics)Send a test event to Google Analytics

Send a linkbreakers\_test event to the connected property in debug mode, so it shows in GA4 DebugView. Google accepts events even with a wrong API secret, so check DebugView to confirm. Requires the \`integrations:write\` scope.

### [#](#send-a-test-event-to-google-analytics-parameters)Parameters

#### header parameters

Idempotency-Key

string

header

Makes retrying this request safe. See components.parameters.IdempotencyKey.

### [#](#send-a-test-event-to-google-analytics-request)Request body

No structured schema available for this section.

### [#](#send-a-test-event-to-google-analytics-response)Response

200

Everything worked as expected.

validationMessages

array<string>

Problems Google's validation server found in the event, empty when none.

### [#](#send-a-test-event-to-google-analytics-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X POST "https://api.linkbreakers.com/v1/integrations/google-analytics/test" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Idempotency-Key: string" \
  -H "Content-Type: application/json" \
  --data '{}'
```

Sample payload (application/json)

```json
{}
```

Typical response

```json
{
  "validationMessages": [
    "string"
  ]
}
```

Base URL: `https://api.linkbreakers.com`

PUT

`/v1/integrations/google-analytics`

Requires auth

## [#](#connect-google-analytics)Connect Google Analytics

Connect a Google Analytics 4 property, or change it. Every person's visit, form submission and piece of visitor data captured is then sent to it through the Measurement Protocol, without personal data. Requires the \`integrations:write\` scope.

### [#](#connect-google-analytics-parameters)Parameters

#### header parameters

Idempotency-Key

string

header

Makes retrying this request safe. See components.parameters.IdempotencyKey.

### [#](#connect-google-analytics-request)Request body

apiSecret

string

Measurement Protocol API secret. Required to connect; omit it to keep the stored one when only changing the Measurement ID.

measurementId

string

GA4 Measurement ID, e.g. "G-ABC123DEF4".

### [#](#connect-google-analytics-response)Response

200

Everything worked as expected.

integration

object

The Google Analytics 4 property a workspace sends its visits to.

### [#](#connect-google-analytics-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X PUT "https://api.linkbreakers.com/v1/integrations/google-analytics" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Idempotency-Key: string" \
  -H "Content-Type: application/json" \
  --data '{"apiSecret":"string","measurementId":"string"}'
```

Sample payload (application/json)

```json
{
  "apiSecret": "string",
  "measurementId": "string"
}
```

Typical response

```json
{
  "integration": {
    "apiSecretSet": false,
    "createdAt": "2026-10-31T00:03:44.836Z",
    "lastError": "string",
    "lastErrorAt": "2026-10-31T00:03:44.836Z",
    "lastSentAt": "2026-10-31T00:03:44.836Z",
    "measurementId": "string",
    "updatedAt": "2026-10-31T00:03:44.836Z"
  }
}
```

Base URL: `https://api.linkbreakers.com`

DELETE

`/v1/integrations/google-analytics`

Requires auth

## [#](#disconnect-google-analytics)Disconnect Google Analytics

Stop sending visits to Google Analytics 4 and delete the stored API secret. Requires the \`integrations:write\` scope.

### [#](#disconnect-google-analytics-parameters)Parameters

This endpoint does not accept any parameters.

### [#](#disconnect-google-analytics-response)Response

200

Everything worked as expected.

No structured schema available for this section.

### [#](#disconnect-google-analytics-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X DELETE "https://api.linkbreakers.com/v1/integrations/google-analytics" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Typical response

```json
{}
```

Base URL: `https://api.linkbreakers.com`

---

Source: https://linkbreakers.com/help/api/google-analytics-integrations
