@fayz-ai/plugin-marketing

中文文档
0.14.13发布于 2026/11/11MITTypeScriptESM + CJS近 30 天下载 8950

Fayz SDK — marketing campaigns & broadcasts plugin

原始使用文档
文档目录5 节
  1. What's inside
  2. Install
  3. Usage
  4. Part of the Fayz SDK
  5. Roadmap & contributing

@fayz-ai/plugin-marketing

One acquisition & conversion engine — every channel, every vertical.

npm license

Status: beta — pre-1.0. Core surface is stable; some backend facets (see PLUGIN_PATTERNS.md) are still landing. APIs may change before 1.0.

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 /marketing workspace: overview, channels (list + detail), campaigns (list + composer), funnel, and landing pages
  • domain presets that set the conversion model + acquisition channels per vertical (defaults to agency)
  • Generic channel performance (reach, conversions, CVR, spend, CPA), funnel, and campaign CVR
  • DI seams: attributionBridge and sitesBridge to feed real data when it's ready
  • Domain events: marketing.conversion.tracked, campaign.created, campaign.updated, channel.synced
  • AI tools: channelPerformance, topChannels, campaignCvr, and createCampaign
  • Dashboard widgets, a central Settings tab, currency formatting, and full i18n
  • Exported MARKETING_PRESETS and a mock provider for local development

Install

npm install @fayz-ai/plugin-marketing

Peer deps: @fayz-ai/core, @fayz-ai/ui, @fayz-ai/admin, plus react / react-dom.

Usage

import { defineSaas } from '@fayz-ai/admin'
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.

版本与发布记录

@fayz-ai/plugin-marketing 共发布 98 个版本,首次发布于 2026/06/18;过去 12 个月发布了 98 个版本。

版本发布日期距今
0.14.13latest2026/11/112 天前
0.14.122026/11/113 天前
0.14.112026/11/113 天前
0.14.102026/11/104 天前
0.14.92026/11/067 天前
0.14.82026/11/068 天前

其他发布通道:next → 0.9.0-next.1,canary → 0.14.1-canary.20261028153856。

关于 @fayz-ai/plugin-marketing 的常见问题

@fayz-ai/plugin-marketing 是什么?

Fayz SDK — marketing campaigns & broadcasts plugin

如何安装 @fayz-ai/plugin-marketing?

在项目目录运行 npm install @fayz-ai/plugin-marketing,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、zustand(^4.5.0 || ^5.0.0)、react-dom(^18.0.0 || ^19.0.0)、lucide-react(>=0.400.0 <1.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fayz-ai/plugin-marketing 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fayz-ai/plugin-marketing 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@fayz-ai/plugin-marketing 可以商用吗?

@fayz-ai/plugin-marketing 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fayz-ai/plugin-marketing 的下载量有多少?

根据 npm 官方下载统计,@fayz-ai/plugin-marketing 在 2026/10/15 – 2026/11/13 这 30 天内被下载 8,950 次,日均约 298 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fayz-ai/plugin-marketing 还在维护吗?

最新版本 0.14.13 发布于 2026/11/11(2 天前);至今共发布 98 个版本,其中过去 12 个月发布了 98 个;首次发布于 2026/06/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。