track_sale
Track Sale
Track a sale conversion event. Records a purchase attributed to a customer, with amount, currency, and optional payment processor details. Supports Stripe, Shopify, Polar, Paddle, RevenueCat, or custom processors.
track_sale
Track a sale conversion event. Records a purchase attributed to a customer, with amount, currency, and optional payment processor details. Supports Stripe, Shopify, Polar, Paddle, RevenueCat, or custom processors.
upsert_link
Create a new short link or update an existing one. If a link with the same URL already exists (or matching domain + key), it will be updated. Otherwise, a new link is created. Useful for idempotent link creation.
get_link
Retrieve details about a specific short link. Look up a link by its Dub link ID, external ID, or domain + slug combination. Returns full link details including click counts, tags, and configuration.
list_events
Retrieve a list of tracked events (clicks, leads, sales) from your workspace. Filter by event type, link, domain, or time range to inspect individual conversion events.
manage_domains
List, create, update, or delete custom domains for your short links. Domains let you use your own branded URLs instead of the default dub.sh domain.
delete_link
Permanently delete a short link. Use the Dub link ID or an external ID prefixed with `ext_`.
list_links
Retrieve a list of short links from your workspace. Filter by domain, tags, folder, search query, and more. Supports pagination and sorting.
create_link
Create a new short link in your Dub workspace. Supports custom domains, slugs, UTM parameters, device targeting, geo targeting, expiration, password protection, conversion tracking, and custom social media cards.
get_metatags
Retrieve Open Graph metadata (title, description, image) for any URL. Useful for generating link previews or populating social media card fields when creating links.
list_customers
Retrieve customers tracked through the conversion funnel. Filter by email, external ID, country, referral link, or search query. Returns customer details with sales data.
track_lead
Track a lead conversion event attributed to a link click. Requires the click ID (obtained from the `dub_id` cookie) and a customer identifier. Use this when a user performs a significant action like signing up.
update_link
Update an existing short link's properties. You can modify the destination URL, slug, UTM parameters, targeting rules, social media card, and more. Identify the link by its Dub link ID or external ID (prefixed with `ext_`).
get_analytics
Retrieve analytics for your links, workspace, or specific resources. Get click, lead, and sale data grouped by various dimensions like country, device, browser, referrer, timeseries, and more. Use `groupBy` to control the aggregation (e.g., "count" for totals, "timeseries" for time-based data, "countries" for geographic breakdown).
manage_tags
Create, update, delete, or list tags used to categorize and organize links. Tags have a name and a color. Use the `action` field to specify what operation to perform.
Create, update, delete, and list short links with custom domains, slugs, UTM parameters, expiration dates, and device/geo-targeting. Generate branded QR codes for links. Retrieve click, lead, and sale analytics with breakdowns by country, city, browser, device, and referrer. Track conversions by recording lead and sale events to attribute user signups and purchases to specific links. Manage customers and associate them with link clicks for attribution. Organize links with tags and folders. Manage partner/affiliate programs including enrolling partners, tracking commissions, and processing payouts. Configure custom domains for short links. Retrieve Open Graph metatags for any URL. Listen to real-time webhook events for link clicks, conversions, partner activity, and more.
Common questions about connecting Dub to AI agents with Metorial.