Adjoin
로그인내 앱으로 수익화
← 문서

SDK 레퍼런스

스크립트 하나, 호출 다섯. 쿠키도 식별자도 없고, 광고가 실패해도 페이지는 막히지 않습니다.

불러오기

광고가 들어갈 자리에 컨테이너를 두고 스크립트를 한 번 불러오세요. 컨테이너 id 는 adjoin- 뒤에 슬롯 ID 입니다.

<!-- one script per page; data-placement renders that slot automatically -->
<div id="adjoin-plc_ab12" data-format="card"></div>
<script async src="https://cdn.adjoin.dev/v1.js" data-placement="plc_ab12"></script>
data-placement
페이지가 준비되면 이 슬롯을 바로 그립니다.
data-format
컨테이너에: banner, card, inline_native, sidebar, newsletter. 기본값 card.
data-tenant
파트너를 통해 왔다면 파트너 slug (파트너 연동 참고).
data-analytics="off"
무료 페이지뷰 분석을 끕니다.

크기: banner 728×90 · card 320×250 · inline_native 600×120 · sidebar 300×250 · newsletter 600×200

adjoin.render(options)

슬롯을 컨테이너에 그립니다. 높이를 먼저 확보하므로 레이아웃이 밀리지 않고, 광고는 Shadow DOM 안에 있어 서로의 CSS 가 섞이지 않습니다. 맞는 광고가 없으면 높이 0 으로 접힙니다.

adjoin.render({
  placement: 'plc_cd34',        // required — the id from your dashboard
  format: 'sidebar',            // banner | card | inline_native | sidebar | newsletter
  onEmpty: () => showMyOwnPromo()  // optional — called when the slot collapses
});

adjoin.trigger(moment, options?)

앱의 순간을 기록합니다 — signup_complete, empty_state, quota_hit 등. 슬롯이 없어도 기록되므로 광고를 꺼도 퍼널은 남습니다.

// record a moment; with a placement it also renders an ad there
adjoin.trigger('signup_complete', { placement: 'plc_ab12' });

adjoin.pageview(path?)

무료 분석. 경로는 앞 두 칸만 보내고, 그 안의 ID 는 :id 로 바꿉니다.

// sent automatically on load; call it yourself on client-side route changes
adjoin.pageview('/pricing');

<!-- or turn analytics off -->
<script async src="https://cdn.adjoin.dev/v1.js" data-analytics="off"></script>

adjoin.segment(label, on?)

오디언스 라벨. 지금 세션을 설명하는 단어(요금제·역할·단계)를 붙입니다. 광고주가 라벨로 대상을 좁히거나 제외할 수 있어 라벨이 붙은 지면은 더 높게 팔립니다. 라벨은 이 탭(sessionStorage)에만 있고 이 사이트의 광고 요청과 페이지뷰에만 실립니다 — 다른 사이트로 방문자를 따라가지 않습니다. 저장되는 것은 라벨별 페이지뷰 합계뿐입니다. 형식: 소문자·숫자·_ : -, 32자 이하, 숫자 6자리 연속 금지. 세션당 최대 5개. 네트워크 전체 7일 페이지뷰가 100 을 넘으면 타게팅할 수 있게 됩니다.

// label this visitor's session — plain words, never ids or emails
adjoin.segment('plan:free');
adjoin.segment('role:developer');
adjoin.segment('plan:free', false);   // remove one
adjoin.segment(null);                 // remove all

// suggested labels: plan:free · plan:paid · plan:trial · role:developer · role:designer
//                   role:founder · stage:onboarding · stage:active · intent:upgrade

adjoin.convert(valueUsd?, orderId?)

CPA·Affiliate 광고주용. 구매 뒤 자기 사이트에서 부르세요. 광고의 클릭 토큰은 이 탭(sessionStorage)에만 두므로 같은 방문 안의 전환을 잇습니다. 주문 번호를 넘기면 같은 주문은 두 번 과금되지 않고, 그 번호로 환불할 수 있습니다. 며칠 뒤 전환은 서버 간(REST API)으로 보내세요.

// on your own site, after checkout
adjoin.convert(29.00, 'order_1234');   // value in USD, your order id

개인정보

쿠키, localStorage, 핑거프린팅을 쓰지 않습니다. 방문자는 날마다 바뀌는 해시로 세므로, 같은 사람을 날짜를 넘어 이어 볼 수 없습니다.

문의: [email protected]