@fayz-ai/plugin-marketing
v0.1.3
Published
Fayz SDK — marketing campaigns & broadcasts plugin
Readme
@fayz-ai/plugin-marketing
One acquisition & conversion engine — every channel, every vertical.
Marketing analytics are always the same shape — channels, campaigns, a funnel, landing-page CVR — but what counts as a "conversion" changes per business. A salon converts a booking, a store converts an order, an agency converts a lead. plugin-marketing is one plugin that adapts to all of them: pick a domain preset (or pass an explicit conversion model + channels) and the funnel, channel performance, and cost-per-acquisition are computed generically on top of it.
It ships a vertical-flavored mock today so the surface is real from the first install. Real attribution arrives through clean DI seams — an AttributionBridge to read conversions from CRM/agenda/orders, and a SitesPerformanceBridge to read landing-page numbers from your sites — so you wire reality in without rewriting the plugin. Campaigns and channels are first-class, and the whole thing exposes AI tools so your assistant can answer "which channel converts best?" out loud.
What's inside
- A
/marketingworkspace: overview, channels (list + detail), campaigns (list + composer), funnel, and landing pages domainpresets that set the conversion model + acquisition channels per vertical (defaults toagency)- Generic channel performance (reach, conversions, CVR, spend, CPA), funnel, and campaign CVR
- DI seams:
attributionBridgeandsitesBridgeto feed real data when it's ready - Domain events:
marketing.conversion.tracked,campaign.created,campaign.updated,channel.synced - AI tools:
channelPerformance,topChannels,campaignCvr, andcreateCampaign - Dashboard widgets, a central Settings tab, currency formatting, and full i18n
- Exported
MARKETING_PRESETSand a mock provider for local development
Install
npm install @fayz-ai/plugin-marketingPeer deps: @fayz-ai/core, @fayz-ai/ui, @fayz-ai/saas, plus react / react-dom.
Usage
import { defineSaas } from '@fayz-ai/saas'
import { createMarketingPlugin } from '@fayz-ai/plugin-marketing'
export const app = defineSaas({
// ...
plugins: [
createMarketingPlugin({
domain: 'beauty', // conversion model + channels from the preset
currency: { code: 'BRL' },
// attributionBridge / sitesBridge wire real data in later
}),
],
})Part of the Fayz SDK
The acquisition half of growth. Pairs with plugin-crm (the leads and deals it converts into), plugin-conversations (broadcast replies land in the inbox), and plugin-reputation (social proof that lifts CVR).
Roadmap & contributing
Built and evolving in the open. See the Fayz SDK roadmap for current gaps, missing features, and good first issues.
