Publisher docs · Custom website

    Estimated time: 3–5 minutes

    Install HalalSpark on a custom website

    For static HTML sites or any site where you can edit the page source directly. Choose a setup method below.

    Before you start

    Your website must be approved before ads can serve. If you have not added your site yet:

    1. Go to your HalalSpark dashboard
    2. Click Add Website
    3. Submit for review

    Approval usually takes up to 24 hours. You will be notified when complete.

    Auto Ads

    Add one script to your site.
    HalalSpark handles placement automatically.

    You only need to add this script once.

    Control ad types, density, and page rules from your dashboard.

    Get your Auto Ads script

    1. Go to your HalalSpark Publisher Dashboard
    2. Click your website
    3. Open the Set Up Ads tab
    4. Select Auto Ads and complete the setup steps
    5. Copy your script from the final screen

    If setup is already complete:

    • Go to your website → Placements tab
    • Click Copy Script next to your Auto Ads configuration
    Example — Auto Ads script
    <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID" async></script>
    YOUR_WEBSITE_ID is unique to your site. Copy the script exactly as shown. Do not edit it.

    Open your site's HTML

    Open the HTML file that contains your <head> section.

    For static sites, this is usually index.html.

    If your site uses a shared layout or template file, add the script there so it loads on every page.

    If your site does not use a shared layout, you must add the script to each page where you want ads to appear.

    Paste the script before </head>

    Find the closing </head> tag. Paste the script directly before it.

    index.html
    <head>
      <!-- existing head content -->
    
      <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID" async></script>
    </head>
    ImportantPlace this script inside <head> — not in the body.
    ImportantDo not remove the async attribute. Without it, the script can block your page from loading.

    Save and publish

    Save your file and deploy your site.

    If you use a CDN or cache, clear it after publishing.

    Check your installation

    • Open your site in a new tab
    • Ads should appear within a few seconds
    • If nothing appears, add ?test=1 to your URL to preview, or see troubleshooting below

    Adjust settings any time

    You can change your settings at any time from the Placements tab in your dashboard:

    • Ad density — number of ads per page
    • Ad types — inline, banner, header, footer, sidebar
    • Page rules — include or exclude specific URLs (only relevant if your script is on every page)

    Changes apply immediately. No code updates required.

    Need different ad settings on different page types? Use named profiles — each profile gets its own script URL (&profile=NAME) that you paste into the relevant template or page. Set them up in your dashboard under Set Up Ads → Auto Ads → Add Profile. Full details in the Auto Ads guide.
    Done. Auto Ads are now active. Impressions are only counted when an ad is at least 50% visible on screen for 1 second.
    Preview mode
    Add ?test=1 to your page URL. Ads show with a TEST label. No impressions are recorded.
    Debug mode
    Add ?debug=true to your page URL. Open your browser console to view logs and placement decisions.

    Manual Ads

    Place ads exactly where you want them.
    Each placement has its own script. Paste it into your HTML where the ad should appear.

    ImportantManual scripts must go inside <body>, not <head>.

    Create a placement and get your script

    1. Go to your HalalSpark Publisher Dashboard
    2. Click your website
    3. Open the Set Up Ads tab
    4. Select Manual Ads, choose an ad type, and complete the setup
    5. Copy your script from the final screen

    If the placement already exists:

    • Go to your website → Placements tab
    • Click Copy next to the placement you want to install
    Example — banner placement
    <script src="https://ads.halalspark.co.uk/get-ad-script-banner?placement_id=YOUR_PLACEMENT_ID&domain=yourdomain.com&_v=3.0" async></script>
    ImportantThe domain= value must match your registered domain exactly.
    example.com and www.example.com are treated as different values. A mismatch will prevent ads from serving.

    Choose where the ad will go

    Each placement type suits a different position on your page:

    TypeBest used for
    BannerIn-content breaks, above or below sections
    HeaderTop of page, above navigation
    FooterBottom of page, below main content
    InlineInside articles, between paragraphs
    SidebarSide columns

    Each type is sized by aspect ratio. HalalSpark serves the best-fitting creative automatically.

    Paste the script in your HTML body

    Open the HTML file for the page where the ad should appear. Paste the script inside <body>, at the exact position where the ad will render.

    index.html
    <body>
      <header>...</header>
    
      <main>
        <article>
          <h1>Your article title</h1>
          <p>First paragraph...</p>
    
          <!-- Ad appears here -->
          <script src="https://ads.halalspark.co.uk/get-ad-script-banner?placement_id=YOUR_PLACEMENT_ID&domain=yourdomain.com&_v=3.0" async></script>
    
          <p>Rest of article...</p>
        </article>
      </main>
    </body>
    ImportantDo not place manual ad scripts in <head>. They must be in the body at the exact position where the ad should appear.

    Repeat for each position

    Each position requires its own placement in the dashboard and its own script in your HTML.

    Multiple placements on the same page work independently.

    Done. Manual Ads are now active. Impressions are only counted when an ad is at least 50% visible on screen for 1 second.
    Preview mode
    Add &test=1 to the script URL. The ad renders with a TEST label. No impression is recorded.
    Debug mode
    Add &debug=1 to the script URL. Open your browser console to see the targeting decision for that placement.

    Ads not showing?

    Work through this checklist before raising a support request.

    Script placement

    • Auto Ads script is inside <head>, before </head>
    • Manual Ads scripts are inside <body> at the position where the ad should appear
    • The async attribute is present on the script tag
    • The script URL uses ads.halalspark.co.uk

    Domain & approval

    • Your website is approved in your HalalSpark dashboard — the Set Up Ads tab only unlocks after approval
    • The domain= value matches your registered domain exactly — www prefix matters

    Page rules & ad match

    • The current page is not excluded by a page rule in your Auto Ads settings
    • A placeholder ad means no paid campaign currently matches your content — this is normal and will resolve as more campaigns go live

    Browser & extensions

    • Disable ad blockers and privacy extensions, then reload
    • Test in a private browsing window with all extensions off

    Debug tools

    • Auto Ads: add ?debug=true to your page URL → open browser console
    • Manual Ads: add &debug=1 to the script URL → open browser console
    • DevTools → Network tab → filter for halalspark to check requests and responses