Onboarding

إعداد وربط التطبيقات

3 خطوات بسيطة لتشغيل Dribads داخل تطبيقاتك

01

أنشئ الإعلان من لوحة التحكم

02

اسحب الإعلان عبر API إلى تطبيقك

03

ابدأ تتبع المشاهدات والنقرات

مثال سريع للاستهلاك

const videoOwnerId = "<creator_user_uuid>";

fetch(`/api/ads?placement=pre_roll&video_owner_id=${videoOwnerId}&app=dribdo`,
  { cache: "no-store" }
)
  .then((res) => res.json())
  .then(({ ad }) => {
    if (!ad) return;

    // 1) Mark impression
    fetch("/api/ad-view", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ ad_id: ad.id, app_slug: "dribdo" }),
    });

    // 2) On click => /api/ad-click
    // 3) On skip => /api/ad-skip
    // 4) On complete => /api/ad-complete
  });