Free to use

Giving campaigns for your app

Show LaunchGood campaigns in your app or site. One script tag or one API call. No signup and no API key.

See the code Try the endpoint

Option 1: one script tag

Paste this where the card should appear. Put your app or site name in data-app so its views and clicks are credited to you.

HTML <script src="https://ummahapi.com/campaign-widget.js" data-app="your-app-name"></script>

This is the live card:

Optional settings: data-format="square" for a square card, data-format="text" for no image, data-theme="dark", and data-target="#my-div" to place it inside your own element.

Option 2: call the API

Build your own card in any app: web, React Native, Flutter, Swift or Kotlin.

JavaScript const res = await fetch('https://ummahapi.com/api/campaign?app=your-app-name&track=0'); const { data } = await res.json(); const c = data.campaigns[0]; // Show these in your card c.title; // "Start every day with sadaqah." c.description; // one short line c.cta; // button text, e.g. "Start Today" c.images.landscape; // 1200 x 628 image c.images.square; // 1080 x 1080 image // When the card is on screen, report the view once fetch(c.impression_url); // When the button is tapped, open this link window.open(c.click_url);

Always open click_url, not the campaign page directly. It records the click and then sends the person to LaunchGood.

What you get

Real campaigns

Campaigns come from LaunchGood and change on their own. You never need to update your app.

Images included

Every campaign has a landscape image (1200 x 628) and a square image (1080 x 1080), plus a title, one line of text and button text.

Your app is credited

Pass your app name and its views and clicks are counted under that name.

Works anywhere

Plain JSON over HTTPS with open CORS. Use it from a website, a mobile app or a server.

Fair counting

Repeat views by the same person count once, and bots are filtered out, so the numbers mean something.

No signup

No account, no API key and no approval step. Add the code and it works.

Endpoints

HTTP GET https://ummahapi.com/api/campaign?app=your-app-name&track=0 GET https://ummahapi.com/api/campaign/impression?id=CAMPAIGN_ID&app=your-app-name GET https://ummahapi.com/api/campaign/click?id=CAMPAIGN_ID&app=your-app-name

The first call returns the campaigns. Each one already carries its own impression_url and click_url, so you do not have to build the other two links yourself.

Response { "success": true, "service": "campaign", "data": { "campaigns": [ { "id": "lg-daily-givers", "title": "Start every day with sadaqah.", "description": "Never miss a day, and watch small deeds grow into lasting impact.", "cta": "Start Today", "images": { "landscape": "https://ummahapi.com/ads/lg-daily-givers-landscape.png", "square": "https://ummahapi.com/ads/lg-daily-givers-square.png" }, "click_url": "https://ummahapi.com/api/campaign/click?id=lg-daily-givers&app=your-app-name", "impression_url": "https://ummahapi.com/api/campaign/impression?id=lg-daily-givers&app=your-app-name" } ], "total": 1 } }

Fair use

Using it in your app?

Tell us what you built. We would like to see it.

Get in touch