Integrations: Google Analytics

Send every scan, visit, form submission and captured visitor detail to your Google Analytics 4 property, server side.

5 entries on this page

The google analytics integration 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.

delivery object

Where, when and what it sends.

8 child attributes
directoryIds array of string

Where: directories it applies to, with every directory below them.

linkIds array of string

Where: links it applies to. All three lists empty means every link.

moments array of enum

When: the moments of a visit it sends at. Ignored when stepIds is set.

stepIds array of string

When: send only when a visit reaches one of these workflow steps.

tagIds array of string

Where: tags it applies to.

targetsGone boolean
Read-only

Every link, directory and tag chosen has since been deleted, so this covers nothing. The lists above are then empty without meaning every link.

visitorAttributeKeys array of string

What: with SELECTED, the attribute keys sent, such as "$email" or "rating".

visitorData enum

What: how much of what is known about the visitor it sends.

Allowed values

  • INTEGRATION_VISITOR_DATA_NONE Only the visit: the link, the step, the device and the place.
  • INTEGRATION_VISITOR_DATA_ALL The visit, and every attribute known about the visitor.
  • INTEGRATION_VISITOR_DATA_SELECTED The visit, and only the attributes named in visitorAttributeKeys.
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.

visitorAttributeKeys array of string

The attribute keys sent, when visitorAttributesEnabled is on. Empty sends every attribute that is not personal data, except free-text answers, which are sent only when their key is listed here.

visitorAttributesEnabled boolean

Whether the visitor's data captured at a step (form answers such as a rating, custom visitor attributes) is added to its event as parameters named lb_<key>. Personal data is never sent.

Example google analytics integration
{
  "apiSecretSet": true,
  "createdAt": "2026-03-14T09:30:00Z",
  "delivery": {
    "directoryIds": [
      "d87a9b30-5c8b-4d4e-9fd3-5f5f5f5f5f5f"
    ],
    "linkIds": [
      "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed"
    ],
    "moments": [
      "KIND_ENTRY",
      "KIND_INTERACTION"
    ],
    "stepIds": [
      "987fcdeb-a321-45e6-b789-123456789012"
    ],
    "tagIds": [
      "7c9e6679-7425-40de-944b-e07fc1f90ae7"
    ],
    "targetsGone": false,
    "visitorAttributeKeys": [
      "$email",
      "rating"
    ],
    "visitorData": "INTEGRATION_VISITOR_DATA_SELECTED"
  },
  "lastError": "Google Analytics refused the event: the API secret is not valid",
  "lastErrorAt": "2026-03-20T18:22:41Z",
  "lastSentAt": "2026-03-21T12:47:13Z",
  "measurementId": "G-7KQ2M9X4PL",
  "updatedAt": "2026-03-18T16:05:00Z",
  "visitorAttributeKeys": [
    "rating",
    "table_number"
  ],
  "visitorAttributesEnabled": true
}
GET
/v1/integrations/google-analytics

Get Google Analytics integration

Return the Google Analytics 4 property the workspace sends its visits to, without the API secret.

Scope integrations:read

Response

200
integration object

Absent when Google Analytics is not connected.

Fields: The google analytics integration object.

Errors answer 4xx or 5xx with the error object, and 429 past the rate limit.

POST
/v1/integrations/google-analytics/test

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.

Scope integrations:write

Parameters

Idempotency-Key string
header

A unique value per request, such as a UUID, that makes retrying it safe: a retry with the same key and body returns the first response instead of acting twice.

Request body

An empty JSON object.

Response

200
validationMessages array of string

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

Errors answer 4xx or 5xx with the error object, and 429 past the rate limit.

PUT
/v1/integrations/google-analytics

Connect Google Analytics

Connect a Google Analytics 4 property, or change its settings. Every person's visit, form submission and piece of visitor data captured is then sent to it through the Measurement Protocol, without personal data. With visitorAttributesEnabled on (the default), form answers and custom visitor attributes go with each event as lb_<key> parameters, numbers as numbers; visitorAttributeKeys limits them to chosen keys.

Scope integrations:write

Parameters

Idempotency-Key string
header

A unique value per request, such as a UUID, that makes retrying it safe: a retry with the same key and body returns the first response instead of acting twice.

Request body

apiSecret string

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

delivery object

Where, when and what it sends. When set, it replaces the whole setting and takes over from visitorAttributesEnabled and visitorAttributeKeys. Leave it out to keep the current one.

7 child attributes
directoryIds array of string

Where: directories it applies to, with every directory below them.

linkIds array of string

Where: links it applies to. All three lists empty means every link.

moments array of enum

When: the moments of a visit it sends at. Ignored when stepIds is set.

stepIds array of string

When: send only when a visit reaches one of these workflow steps.

tagIds array of string

Where: tags it applies to.

visitorAttributeKeys array of string

What: with SELECTED, the attribute keys sent, such as "$email" or "rating".

visitorData enum

What: how much of what is known about the visitor it sends.

Allowed values

  • INTEGRATION_VISITOR_DATA_NONE Only the visit: the link, the step, the device and the place.
  • INTEGRATION_VISITOR_DATA_ALL The visit, and every attribute known about the visitor.
  • INTEGRATION_VISITOR_DATA_SELECTED The visit, and only the attributes named in visitorAttributeKeys.
measurementId string

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

visitorAttributeKeys object

Send only these attribute keys. Omit to keep the current list; an empty list sends every attribute that is not personal data.

1 child attribute
keys array of string

Visitor attribute keys, e.g. "rating". Empty means every attribute that is not personal data. At most 25.

visitorAttributesEnabled boolean

Add the visitor's data (form answers such as a rating, custom visitor attributes) to events as parameters, never personal data. Omit to keep the current setting; on by default when connecting.

Response

200
integration object

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

Fields: The google analytics integration object.

Errors answer 4xx or 5xx with the error object, and 429 past the rate limit.

DELETE
/v1/integrations/google-analytics

Disconnect Google Analytics

Stop sending visits to Google Analytics 4 and delete the stored API secret.

Scope integrations:write

Response

200

An empty JSON object.

Errors answer 4xx or 5xx with the error object, and 429 past the rate limit.