Install via npm
Use the npm package for apps with a bundler, or the CDN snippet for copy‑paste integration.
npm
npm i adjuice-sdk
import { injectAdJuice } from 'adjuice-sdk';
injectAdJuice({ appId: 'YOUR_APP_ID', placement: 'banner' }); // 'interstitial' | 'rewarded'
React wrapper
npm i adjuice-react
import { AdJuiceSlot } from 'adjuice-react';
export default function Example() {
return <AdJuiceSlot appId='YOUR_APP_ID' placement='banner' />;
}
React Native (WebView)
npm i adjuice-react-native react-native-webview
import { WebView } from 'react-native-webview';
import { buildAdJuiceUrl } from 'adjuice-react-native';
export default function Example() {
const uri = buildAdJuiceUrl({ appId: 'YOUR_APP_ID', placement: 'interstitial' });
return <WebView source={{ uri }} />;
}
CDN (no bundler)
<script src="https://adjuice.app/api/sdk?app_id=YOUR_APP_ID&placement=banner" async></script>
One‑tag auto‑init
<script src="https://adjuice.app/api/sdk/auto" data-adjuice data-app-id="YOUR_APP_ID" data-placement="banner" async></script>
AdSense setup
- Set env:
NEXT_PUBLIC_ADSENSE_CLIENT_ID = pub-…
andNEXT_PUBLIC_ADSENSE_CLIENT_ID_CA = ca-pub-…
- Enable “Allow AdSense” in app Settings and enter your Publisher ID.
- Add ads.txt: served at
/ads.txt
. Ensure it includes your pub ID. - Use a CMP for EEA/UK/CH; Consent Mode v2 is supported.
Tips
- Start with
banner
, then tryinterstitial
orrewarded
. - Free plans show a Powered by AdJuice badge; Pro removes it.
- See Mobile for React Native/WebView usage.