RankingTracker
Ranking 추적 — RankableItemInterface + rank_diff/trend 자동 분류 (검색어/상품/콘� �츠 모두)
상태
| 항목 | 값 |
|---|---|
| Layer | core |
| Tier | L1 |
| Status | released |
| Version | 1.0.0 |
| 가격 | Free (free) |
| **카� | |
| �고리** | Infrastructure |
개요
개요
RankingTracker 는 multi-saas-kit 의 Layer 1 Core Plugin � 니다. 어떤 ID 기반 collection 의 순위 변화 추적 — rank_diff, trend (rising/falling/stable/new/dropped) 분류 — 을 제공합니다.
분리선 (ADR-039)
ADR-039 사례 4 — 기존 KeywordTracking (scout.how 키워드 추적 출처) 일반화. 이미 RankableItemInterface 추상화로 도메인 무관 코드였음.
변경: namespace App\Plugins\KeywordTracking → App\Plugins\RankingTracker, slug keyword-tracking → ranking-tracker, class KeywordRankingCalculator → RankingCalculator.
핵심 컴포넌트
RankableItemInterface
구현체가 만족해야 할 메서드: getRankableId(), getCurrentRank(), getPreviousRank(). 어떤 도메인 모델이든 (Keyword, Product, Article, Hashtag, ...) 적용 가능.
RankingCalculator (Pure)
rankDiff()— current vs previous (음수=상승, 양수=하강)trend()— rising / falling / stable / new / dropped 자동 분류 (threshold ±3 default)summary($items)— 전체 변화량 집계
활용 시나리오
- scout.how: 검색어 순위 추적 (Keyword)
- commerce: 상품 베스트� �러 변동 (Product)
- 미디어: 인기 게시물 순위 (Article)
- 음� SaaS: 차트 변동 (Track)
- SNS: 해시태그 트렌드 (Hashtag)
사용 예시
use App\Plugins\RankingTracker\Contracts\RankableItemInterface;
use App\Plugins\RankingTracker\Services\RankingCalculator;
class Product extends Model implements RankableItemInterface {
public function getRankableId(): int|string { return $this->id; }
public function getCurrentRank(): ?int { return $this->today_rank; }
public function getPreviousRank(): ?int { return $this->yesterday_rank; }
}
$calc = new RankingCalculator;
foreach ($products as $p) {
$diff = $calc->rankDiff($p); // -3 (3계단 상승)
$trend = $calc->trend($p); // 'rising'
}
출처
scout.how BookKeyword + ranking history table 에서 추출 → RankingTracker 로 일반화.
의존성
core: >=1.1.0
라이선스
MIT
데모
- Platform 관리자 패널에서 메타 확인 🔒 로그인 필요
- 사용 예시 (PHP)
🛒 Plugin Store에서 보기: store.codebase.how/plugins/ranking-tracker