Overview
HudaTech is a halal-first advertising network connecting ethical advertisers with vetted publishers across web and mobile. This documentation covers the official client integrations (Web SDK and mobile WebView via ad.html), server API examples for publishers, policies, and troubleshooting.
- Supported formats: banner, box
- Revenue models: CPI, CPC
- Primary integrations: JavaScript Web SDK + responsive
ad.htmlfor WebViews (only for mobile apps)
Getting started
- Create an account at hudatech.com.ng and verify your email.
- Publishers: Add a new source at
/publisher/sources— after approval you'll receive a unique data-key (publisher API key). - Advertisers: Use the advertiser dashboard to create campaigns via the web UI.
- Integrate the Web SDK or the mobile
ad.htmlWebView depending on your platform.
Web SDK
Place the script in the <head> or before </body>. Replace data-key and data-format as needed. This is the canonical and only supported web embed for serving ads.
Exact snippet (use your publisher data-key):
<script
defer
data-key="YOUR_PUBLISHER_KEY"
data-format="box"
src="https://hudatech.com.ng/sdk/alhuda-web-sdk.min.js">
</script>
The SDK will create a containers and render creatives. It handles impression and click tracking automatically.
Mobile apps (WebView) — ad.html
Use ad.html to render responsive creatives inside app WebViews. Query parameter are required.
Exact mobile URL pattern (replace placeholders):
https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=banner&app_package=your.app.package
Required query parameters
| param | required | description |
|---|---|---|
key | yes | Publisher API key (data-key) |
format | yes | banner | box |
app_package | yes | Android package name (e.g. com.company.app) or iOS bundle id |
Events & communication
ad.html posts JSON events to the WebView host via window.postMessage and supports native JS bridges where available. Events include adLoaded, adClick, and adError. See platform examples for handling these events.
Platform WebView examples
Android (Java) — WebView
WebView webview = findViewById(R.id.adWebView);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setDomStorageEnabled(true);
String url = "https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=box&app_package=" + getPackageName();
webview.loadUrl(url);
// Optional: receive postMessage events via JS interface
webview.addJavascriptInterface(new Object(){
@JavascriptInterface
public void onMessage(String json){
// parse events from ad.html
}
}, "HudaTechBridge");
Android (Kotlin)
val webview: WebView = findViewById(R.id.adWebView)
webview.settings.javaScriptEnabled = true
val url = "https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=banner&app_package=${packageName}"
webview.loadUrl(url)
webview.evaluateJavascript("window.postMessage({type:'nativeReady'}, '*')", null)
iOS (Swift) — WKWebView
import WebKit
let webView = WKWebView(frame: adContainer.bounds)
adContainer.addSubview(webView)
let url = URL(string: "https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=box&app_package=com.yourcompany.app")!
webView.load(URLRequest(url: url))
class MessageHandler: NSObject, WKScriptMessageHandler {
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
// message.body -> event JSON
}
}
webView.configuration.userContentController.add(MessageHandler(), name: "HudaTechBridge")
Flutter
WebView(
initialUrl: 'https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=box&app_package=com.yourcompany.app',
javascriptMode: JavascriptMode.unrestricted,
javascriptChannels: {
JavascriptChannel(name: 'HudaTechBridge', onMessageReceived: (msg){
// msg.message is event JSON from ad.html
})
},
)
React Native
import { WebView } from 'react-native-webview'
<WebView
source={{ uri: 'https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=box&app_package=com.yourcompany.app' }}
onMessage={(event) => {
const data = JSON.parse(event.nativeEvent.data)
// handle adLoaded / adClick
}}
/>
Unity
// Use a WebView plugin and load the ad.html URL
string url = "https://hudatech.com.ng/sdk/ad.html?key=YOUR_PUBLISHER_KEY&format=box&app_package=com.yourcompany.app";
uniWebView.Load(url);
uniWebView.AddJavaScriptHandler("HudaTechBridge", (data) => {
// data contains event JSON
});
Event JSON format
{
"event": "adLoaded",
"ad_id": "ad_abc123",
"format": "box"
}
{ "event": "adClick", "ad_id": "ad_abc123", "click_url": "https://..." }
API Reference (Publishers & Platform)
All API endpoints use HTTPS and require Authorization: Bearer YOUR_API_KEY. The documented APIs here are focused on publisher operations (ad retrieval, reporting, earnings). Advertiser campaign management is done via the dashboard UI only.
Error codes
| Code | HTTP | Description |
|---|---|---|
| ERR_AUTH_01 | 401 | Invalid or missing API key |
| ERR_REQ_02 | 400 | Malformed request / validation error |
| ERR_RATE_03 | 429 | Rate limit exceeded |
| ERR_APPPKG_04 | 400 | Missing or invalid app_package parameter (mobile WebView requests) |
| ERR_INTERNAL_05 | 500 | Server error — contact support |
Rate limits
Default limits: 100 requests/minute per API key. Bulk/reporting endpoints may have different limits—see endpoint docs in the developer portal.
Authentication & Security
- Use HTTPS for all requests. HTTP is not supported.
- Keep API keys secret. Rotate keys if compromised.
- Publisher keys are scoped for ad retrieval only; Advertiser actions must be performed via the dashboard UI.
- Do not embed advertiser billing keys in client apps; perform sensitive operations server-side.
Policies & Moderation
All creatives and campaigns are reviewed for compliance with HudaTech's halal and ethical standards. Common rejection reasons include:
- Non-halal offers (interest-based loans, gambling)
- Adult or provocative content
- Misleading claims
- Malicious landing pages
Contact support for appeal: hudatech00@gmail.com.
Troubleshooting
Ad not showing
- Confirm the
data-keyis correct and source is approved. - Open the browser/device console for network errors.
- Disable ad blockers and test again.
Missing app_package error
Mobile requests without app_package return ERR_APPPKG_04. Ensure you pass the correct package name/bundle id.
Invalid traffic & payments withheld
We run automated fraud detection; if invalid traffic is detected impressions may be invalidated and payments adjusted. Publishers receive a report with details and can request review.
Support
For integration help and urgent issues email hudatech00@gmail.com. Include account ID, source ID, SDK version, and example URLs. For finance/payout queries include your publisher ID.
Changelog
- v1.0.0 (2025-11-05) — Production documentation release.