Growth Marketing and Discord Affiliate Operations
This document defines how AvatarShot tracks affiliate and social growth, how Discord automation works, and how administrators can safely start or stop campaign automation at runtime.
Scope
- Referral attribution (code, source, campaign)
- Social sharing event tracking and milestone rewards
- Discord growth notification automation
- Admin controls for live start/stop operations
Referral Attribution Model
When a user lands from a referral URL, AvatarShot stores campaign context in session and binds it to the account at first registration.
/ref/{code}?source=discord&campaign=summer_drop/ref/discord/{code}?campaign=launch_week
On new account creation, these fields are persisted:
referral_code(for reward relation)referral_source(for channel attribution, e.g. discord)referral_campaign(for campaign-level reporting)
Social Share Tracking
Feed share actions are tracked through feed/actions/track and mapped as share_platform actions.
Configured platforms include native share, X, WhatsApp, Telegram, Facebook, LinkedIn, Reddit, Discord, Instagram, TikTok, Pinterest, and YouTube. Unsupported direct-share platforms use copy-link fallback while still emitting tracked events.
Reward Logic
- Referral bonus: every configured number of invited users grants Pro days.
- Post sharing milestone: post-count milestones grant Pro days.
- Social share milestone: tracked share milestones grant Pro days.
All thresholds are configurable in config/marketing.php via environment variables.
Discord Automation (Start/Stop at Runtime)
Discord growth notifications are sent through webhook integration and can be toggled without deploy.
- Admin page:
/admin/growth - Start button: enables Discord automation immediately
- Stop button: disables Discord automation immediately
- Status shown as Running or Stopped
Webhook configuration: set DISCORD_WEBHOOK_URL. If missing, automation can be running but no outbound Discord message is sent.
Operational Recommendations
- Create one campaign code per Discord wave for clean attribution.
- Use consistent source labels (discord, x, telegram, etc.).
- Review growth metrics weekly in Admin Growth Hub.
- Pause automation during campaign QA or incident response using the Stop control.