setupAd
Bắt đầu hỗ trợ ở phiên bản:
- SDK: 2.37.0
import { setupAd } from "zmp-sdk/apis";
API cấu hình các thông tin dùng để chạy quảng cáo. API cần được gọi khi khởi tạo ứng dụng.
thông tin
Tính năng đang trong giai đoạn thử nghiệm và chỉ được mở cho một số đối tác nhất định
Ví dụ
Bên trong app.ts
:
import React from "react";
import { createRoot } from "react-dom/client";
import { setupAd } from "zmp-sdk/apis";
import "zmp-ui/zaui.css";
import "./css/app.scss";
import App from "./components/app";
// Setup advertising
setupAd();
const root = createRoot(document.getElementById("app"));
root.render(React.createElement(App));