Google oauth#
Google OAuth integration for connecting Google Analytics.
Connect google analytics#
Generate a Google OAuth authorization URL for connecting Google Analytics.
Owner only
typescript
const { data } = await bw.google.connect({
organizationId: 'org_123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| redirectPath | string | — | Path to redirect to after OAuth (max 500 characters). |
Response#
Returns { data } with the result.
Select google analytics property#
Select a Google Analytics property for the organization.
Owner only
typescript
const { data } = await bw.google.selectProperty({
organizationId: 'org_123',
propertyId: '...',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| propertyId | string | Required | GA4 property identifier to connect (max 64 characters). |
Response#
Returns { data } with the result.
Disconnect google analytics#
Disconnect Google OAuth and remove stored tokens.
Owner only
typescript
const { data } = await bw.google.disconnect({
organizationId: 'org_123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
Response#
Returns { data } with the result.