Conversion sources#
Manage conversion sources (HDYHAU surveys, UTM links, etc.) that attribute conversions to marketing activities.
Provider required
BrandwaveProvider ancestor in your component tree. See the React Hooks overview for setup instructions.useListConversionSources#
List conversion sources with pagination, search, and sorting.
import { useListConversionSources } from '@brandwave/react';
const { data, isLoading } = useListConversionSources({
pageIndex: 0,
pageSize: 25,
organizationId: 'org_123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| pageIndex | integer | Required | Zero-based page index for pagination. |
| pageSize | integer | Required | Number of items per page (1-100). |
| organizationId | string (UUID) | Required | Organization identifier. |
| searchTerm | string | — | Free-text search term to filter results (max 200 characters). |
| sortBy | string | — | Column name to sort by. |
| sortDirection | 'asc' | 'desc' | — | Sort direction: ascending or descending. |
Response#
Returns { items, totalCount, facets } with paginated results.
Underlying SDK method: bw.conversionSources.list(params)
useConversionSource#
Retrieve a single conversion source by ID.
import { useConversionSource } from '@brandwave/react';
const { data, isLoading } = useConversionSource({
id: 'abc-123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Conversion source identifier. |
Response#
Returns { data } with the result.
Underlying SDK method: bw.conversionSources({ id })
useCreateConversionSource#
Create a new conversion source with a marketing channel category for tracking attribution.
import { useCreateConversionSource } from '@brandwave/react';
const { mutate, isPending } = useCreateConversionSource();
mutate({
organizationId: 'org_123',
name: 'My Campaign',
type: 'instagram_post',
category: '...',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| name | string | Required | Conversion source name. |
| type | 'hdyhau' | 'promo_code' | 'tracking_link' | Required | Attribution method type. |
| category | 'organic_social' | 'podcast' | 'events' | 'paid' | 'referral' | 'other' | Required | Marketing channel category. |
| channel | 'instagram' | 'youtube' | 'tiktok' | 'twitter' | 'linkedin' | 'reddit' | null | — | Social media platform for this conversion source. |
| creatorId | string (UUID) | — | Creator associated with this source. |
| campaignId | string (UUID) | — | Campaign associated with this source. |
| code | string | — | Promo code or tracking code (max 255 characters). |
| url | string (URL) | — | Tracking URL for link-based attribution (max 2,048 characters). |
Response#
Returns { data } with the result.
Underlying SDK method: bw.conversionSources.create(params)
useUpdateConversionSource#
Update a conversion source attribution type, category, social media channel, creator or campaign association, promo code, or tracking URL.
import { useUpdateConversionSource } from '@brandwave/react';
const { mutate, isPending } = useUpdateConversionSource();
mutate({
id: 'abc-123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Conversion source identifier to update. |
| name | string | — | Updated name (1-255 characters). |
| type | 'hdyhau' | 'promo_code' | 'tracking_link' | — | Updated attribution type. |
| category | 'organic_social' | 'podcast' | 'events' | 'paid' | 'referral' | 'other' | — | Updated category. |
| channel | 'instagram' | 'youtube' | 'tiktok' | 'twitter' | 'linkedin' | 'reddit' | null | — | Updated social media platform. |
| creatorId | string (UUID) | null | — | Updated creator association. |
| campaignId | string (UUID) | null | — | Updated campaign association. |
| code | string | null | — | Updated promo/tracking code (max 255 characters). |
| url | string (URL) | null | — | Updated tracking URL (max 2,048 characters). |
| isActive | boolean | — | Whether this source is active. |
Response#
Returns { data } with the result.
Underlying SDK method: bw.conversionSources.update(params)
useDeleteConversionSource#
Permanently delete a conversion source and disassociate its conversions.
import { useDeleteConversionSource } from '@brandwave/react';
const { mutate, isPending } = useDeleteConversionSource();
mutate({
id: 'abc-123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Conversion source identifier to delete. |
Response#
Returns { data } with the result.
Underlying SDK method: bw.conversionSources.delete(params)
Cascading effect