Iframe Integration
The fastest way to integrate Offerlia into your web application. Drop in a single iframe tag and you're done.
Basic Integration
Add the Offerlia offerwall to your page with a single iframe tag:
<iframe
src="https://beta.offerlia.com/offerwall/embed?appId=YOUR_APP_ID&userId=USER_ID"
width="100%"
height="600"
frameborder="0"
allowfullscreen
/>URL Parameters
| Parameter | Required | Description |
|---|---|---|
appId | Yes | Your app ID from the dashboard |
userId | Yes | Unique identifier for the current user |
device | No | Device types (comma-separated): web, android, ios |
theme | No | Theme: dark (default) or light |
Example with All Parameters
<iframe
src="https://beta.offerlia.com/offerwall/embed?appId=abc123def456&userId=user_456&device=web,android&theme=dark"
width="100%"
height="600"
frameborder="0"
allowfullscreen
/>PostMessage Communication
The iframe can communicate with your parent page using postMessage for events like conversions:
window.addEventListener('message', (event) => {
// Verify origin
if (event.origin !== 'https://beta.offerlia.com') return;
if (event.data.type === 'conversion') {
const { conversionId, amount, currency } = event.data;
// Handle conversion in your app
console.log('Conversion:', conversionId, amount, currency);
}
});Security Best Practices
Always verify postMessage origin
Check that event.origin matches https://beta.offerlia.com before processing messages.
Use HTTPS
Always serve your pages over HTTPS to ensure secure communication with the iframe.
Validate user IDs
Never trust user IDs from client-side code. Always validate conversions server-side via postbacks.