intelligems-profit-impact

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/intelligems-profit-impact

/intelligems-profit-impact

The CFO tool. Turns "+12% RPV" into "$47K/year" — the language that gets tests shipped.
Takes any Intelligems A/B test and projects the financial impact: conservative, expected, and optimistic annual revenue, break-even analysis, opportunity cost of delays, and a stakeholder-ready summary.

这款面向CFO的工具,可将“+12% RPV(每访问用户收入)”转化为“每年4.7万美元”——这种业务语言能推动测试项目落地。
它可对接任意Intelligems A/B测试,预测其财务影响:包含保守、预期、乐观三种场景的年度收入,收支平衡分析,决策延迟的机会成本,以及一份可供利益相关方查看的总结报告。

Step 0: Workspace Check

步骤0:工作区检查

Check if the workspace exists:
bash
ls ~/intelligems-analytics/venv/bin/activate 2>/dev/null && echo "READY" || echo "NEEDS_SETUP"
If NEEDS_SETUP: Copy and run the setup script from
intelligems-core/references/
:
bash
bash ../intelligems-core/references/setup_workspace.sh
Then copy the core libraries:
bash
cp ../intelligems-core/references/ig_client.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_metrics.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_helpers.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_config.py ~/intelligems-analytics/

检查工作区是否存在:
bash
ls ~/intelligems-analytics/venv/bin/activate 2>/dev/null && echo "READY" || echo "NEEDS_SETUP"
若显示NEEDS_SETUP:
intelligems-core/references/
复制并运行设置脚本:
bash
bash ../intelligems-core/references/setup_workspace.sh
然后复制核心库文件:
bash
cp ../intelligems-core/references/ig_client.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_metrics.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_helpers.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_config.py ~/intelligems-analytics/

Step 1: Get API Key

步骤1:获取API密钥

Check if the API key is already configured:
bash
grep -v "your_api_key_here" ~/intelligems-analytics/.env 2>/dev/null | grep "INTELLIGEMS_API_KEY=" | head -1
If no valid key found, ask the user:
"What's your Intelligems API key? You can get one by contacting support@intelligems.io"
Then save it:
bash
echo "INTELLIGEMS_API_KEY=<user's key>" > ~/intelligems-analytics/.env
Never hardcode or assume an API key.

检查是否已配置API密钥:
bash
grep -v "your_api_key_here" ~/intelligems-analytics/.env 2>/dev/null | grep "INTELLIGEMS_API_KEY=" | head -1
若未找到有效密钥,请询问用户:
"你的Intelligems API密钥是什么?你可以通过联系support@intelligems.io获取。"
然后保存密钥:
bash
echo "INTELLIGEMS_API_KEY=<用户密钥>" > ~/intelligems-analytics/.env
切勿硬编码或默认假设API密钥。

Step 2: Copy Impact Script

步骤2:复制影响分析脚本

Copy the profit impact script to the workspace:
bash
cp references/impact.py ~/intelligems-analytics/impact.py
Also ensure the core libraries are up to date:
bash
cp ../intelligems-core/references/ig_client.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_metrics.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_helpers.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_config.py ~/intelligems-analytics/

将利润影响分析脚本复制到工作区:
bash
cp references/impact.py ~/intelligems-analytics/impact.py
同时确保核心库文件是最新版本:
bash
cp ../intelligems-core/references/ig_client.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_metrics.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_helpers.py ~/intelligems-analytics/
cp ../intelligems-core/references/ig_config.py ~/intelligems-analytics/

Step 3: Select Test

步骤3:选择测试项目

Run the script. If the user provided a test ID, pass it as an argument:
bash
source ~/intelligems-analytics/venv/bin/activate && cd ~/intelligems-analytics && python3 impact.py
Or with a specific test ID:
bash
source ~/intelligems-analytics/venv/bin/activate && cd ~/intelligems-analytics && python3 impact.py <test_id>
If no test ID is provided, the script lists all active experiments and prompts for selection.

运行脚本。如果用户提供了测试ID,将其作为参数传入:
bash
source ~/intelligems-analytics/venv/bin/activate && cd ~/intelligems-analytics && python3 impact.py
或者传入指定测试ID:
bash
source ~/intelligems-analytics/venv/bin/activate && cd ~/intelligems-analytics && python3 impact.py <test_id>
如果未提供测试ID,脚本会列出所有活跃实验并提示用户选择。

Step 4: Run

步骤4:运行脚本

The script outputs a full profit impact report to stdout. Let it run to completion.
If the script errors:
  • "No active experiments" — The store has no running tests. Let the user know.
  • "0 orders" — The test is too new. Suggest waiting for more data.
  • API errors — Check the API key is valid.

脚本会将完整的利润影响报告输出到标准输出。等待脚本运行完成。
若脚本报错:
  • "No active experiments" — 店铺当前没有正在运行的测试项目,请告知用户。
  • "0 orders" — 测试项目太新,建议等待更多数据积累。
  • API错误 — 检查API密钥是否有效。

Step 5: Present Results

步骤5:呈现结果

Read the script output and present it as a financial impact report. Frame everything in business terms:
  1. Lead with dollars — The annual impact number comes first, front and center
  2. Show the range — Conservative / Expected / Optimistic so stakeholders see the floor and ceiling
  3. Break-even framing — "You can afford to lose X% of conversions and still come out ahead"
  4. Urgency — "Every day you wait costs $X" drives action
  5. Business-case summary — 2-3 sentences ready to paste into a Slack message or email to leadership
Tone: Confident but not overselling. Use the conservative number when making the strongest claims. Lead with the expected number for impact, but always caveat with the range.
If the lift is negative: Still present the numbers honestly. Frame as "this variant would cost you $X/year" — knowing this is valuable too.
If confidence is low: Flag it prominently. "These projections carry higher uncertainty — the test needs more data before acting."

读取脚本输出并整理为财务影响报告,全程使用业务术语表述:
  1. 以金额为核心 — 首先突出展示年度影响金额
  2. 展示范围区间 — 提供保守/预期/乐观三种场景,让利益相关方了解收益下限与上限
  3. 收支平衡视角 — 表述为“即使转化率下降X%,你仍能实现收支平衡”
  4. 强调紧迫性 — “每延迟一天,你将损失X美元”推动决策行动
  5. 业务案例总结 — 准备2-3句话,可直接粘贴到Slack消息或发给管理层的邮件中
语气: 自信但不过度夸大。在做出有力论断时使用保守场景数据;为体现影响力可先展示预期数据,但务必同时说明区间范围。
若提升率为负: 仍需如实呈现数据,表述为“该变体每年将导致你损失X美元”——这类信息同样具有价值。
若数据置信度低: 需显著标注。“这些预测的不确定性较高——测试项目需要更多数据支持才能采取行动。”

Step 6: Set Up Slack Automation (Optional)

步骤6:设置Slack自动化(可选)

If the user wants profit impact reports delivered to Slack, set up a Slack integration:
1. Get a Slack webhook URL
Ask the user:
"To send profit impact reports to Slack, you need an Incoming Webhook URL. Go to https://api.slack.com/apps → Create New App → Incoming Webhooks → Add New Webhook. Which channel should reports go to?"
2. Copy the Slack module
bash
cp ../intelligems-core/references/ig_slack.py ~/intelligems-analytics/ig_slack.py
3. Test it
Run the impact report with the
--slack
flag:
bash
cd ~/intelligems-analytics && source venv/bin/activate && python3 impact.py <test_id> --slack "<webhook_url>"
Verify the message appears in Slack with dollar projections, ranges, and business case summary.
4. Schedule it (optional)
Copy and run the automation setup script:
bash
cp ../intelligems-core/references/setup_automation.sh ~/intelligems-analytics/
bash ~/intelligems-analytics/setup_automation.sh impact.py "<webhook_url>" 9 0
This creates a macOS LaunchAgent that runs the profit impact daily at 9:00 AM and posts to Slack.

如果用户希望将利润影响报告自动发送到Slack,可设置Slack集成:
1. 获取Slack Webhook URL
询问用户:
"要将利润影响报告发送到Slack,你需要一个Incoming Webhook URL。访问https://api.slack.com/apps → 创建新应用 → Incoming Webhooks → 添加新Webhook。报告应发送到哪个频道?"
2. 复制Slack模块
bash
cp ../intelligems-core/references/ig_slack.py ~/intelligems-analytics/ig_slack.py
3. 测试功能
添加
--slack
参数运行影响报告:
bash
cd ~/intelligems-analytics && source venv/bin/activate && python3 impact.py <test_id> --slack "<webhook_url>"
验证消息是否已发送到指定Slack频道,内容需包含美元预测、区间范围和业务案例总结。
4. 定时调度(可选)
复制并运行自动化设置脚本:
bash
cp ../intelligems-core/references/setup_automation.sh ~/intelligems-analytics/
bash ~/intelligems-analytics/setup_automation.sh impact.py "<webhook_url>" 9 0
这将创建一个macOS LaunchAgent,每天上午9:00自动运行利润影响分析并将结果发布到Slack。

Notes

注意事项

  • Slack output: When using
    --slack
    , results are formatted as Slack Block Kit messages with annual impact, monthly breakdown, opportunity cost, and business case summary.
  • Terminal output: Without
    --slack
    , the report prints to the terminal as before.
  • Slack输出: 使用
    --slack
    参数时,结果将以Slack Block Kit消息格式展示,包含年度影响、月度细分、机会成本和业务案例总结。
  • 终端输出: 不使用
    --slack
    参数时,报告将像之前一样打印到终端。