Publisher docs · How Auto Ads work

    Auto Ads

    How Auto Ads work

    One script. No ongoing management. HalalSpark reads your page and places halal-certified ads automatically.

    What it is

    Auto Ads are exactly what they sound like. You add one snippet of code to your website, and HalalSpark takes it from there. No ongoing management. No decisions about where ads go. The script reads your page, finds the right spots, and places ads automatically.

    The ads are always halal-certified and matched to your site's content category. And they only appear if there's enough content on the page to justify them — short pages are left alone.

    How it works

    When a visitor lands on your page, the script runs in the background. It reads through your content — paragraphs, headings, how long the page is — decides where ads fit naturally, and places them. The ads are matched to your site's content category and served from active advertiser campaigns.

    1. Visitor lands on page
    2. Script reads your content
    3. Best slots identified
    4. Halal ads placed automatically

    The smart way to install it

    If you want the same ad settings everywhere, create one profile and add its script to your site's main layout or theme file. It loads on every page automatically. Use page rules in your dashboard to exclude any pages you don't want ads on — checkout, login, contact.

    If you want different settings on different page types, create one profile per page type and paste each profile's script into the relevant template. More on this in the Named profiles section below.

    What appears on your page

    Content ads — always on

    These sit inside your page content. They're part of every Auto Ads setup and can't be turned off.

    inline ad
    banner ad

    Inline ads

    Sit between paragraphs, like a natural pause in your content. Near-square format.

    Banner ads

    Wide horizontal strip placed between major content blocks.

    Overlay ads — optional

    These are fixed to the screen rather than inside content. More noticeable, more revenue potential — but also more impact on the reading experience. You choose which ones to include during setup.

    header overlay
    rail
    footer overlay

    Header overlay

    Thin bar at the top of the screen. Visitors can dismiss it. Reappears after 5 minutes.

    Footer overlay

    Same as header, anchored to the bottom of the screen.

    Side rail

    Vertical ads in the page margins. Only shows on screens wider than 1200px and only when your content doesn't fill the full width. Invisible on mobile.

    What you control

    You make three choices during setup. The defaults work fine if you just want to get started.

    Ad density

    Density controls two things: how many ads can appear per page, and how much content a page needs before any ads appear at all. If a page falls below the minimum, the script places nothing — regardless of the density setting.

    SettingAds per pageMin. content
    Conservative2–6800 characters
    Balanced (default)3–10500 characters
    Aggressive5–16300 characters
    Maximum6–20200 characters

    Ad count scales with content length — the lower number applies to short pages, the higher number to long articles or recipe pages.

    These are caps, not targets — picking Maximum doesn't mean you should. If you also run Manual placements on the same pages, count them together: the combined total is what the reader sees. We'd rather you under-monetize a page than have a visitor leave because it felt like an ad wall.

    Ad types

    Inline and banner ads are always included. For overlays — header, footer, and side rail — you choose which ones you want during setup. You can change this any time from your dashboard.

    Page rules

    If you've installed the script on a shared template file, use page rules to control which pages show ads. Three modes:

    • Show on all pages — default, ads everywhere the script loads
    • Exclude certain URLs — use patterns to block specific pages (e.g. /checkout, /login)
    • Show only on certain URLs — opt-in list of pages where ads appear

    Different settings per page — named profiles

    By default, one Auto Ads configuration applies to your whole site. That's the right choice for most publishers. But if you want genuinely different settings on different parts of your site — denser ads on long blog posts, lighter ads on your homepage, no overlays on shop pages — named profiles let you do that.

    How profiles work

    Each profile is a separate Auto Ads configuration — its own density setting, ad types, and page rules. You create profiles in your dashboard under Set Up Ads → Auto Ads → Add Profile. Every profile has a name, and its script URL includes that name as the &profile=NAME parameter. You paste the right profile's script into the right page template — your blog template gets the blog profile script, your product template gets shop, and so on.

    Example — three profiles, each on a different template
    <!-- "main" profile — goes in your main layout/template -->
    <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID&profile=main" async></script>
    
    <!-- "blog" profile — goes in your blog post template only -->
    <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID&profile=blog" async></script>
    
    <!-- "shop" profile — goes in your product page template only -->
    <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID&profile=shop" async></script>

    How to use them

    Each profile's script goes in the relevant page template. Your blog post template gets the &profile=blog script. Your product template gets &profile=shop. If you want ads across the whole site with consistent settings, one profile in your global layout is enough.

    Profile names must be lowercase letters, numbers, or hyphens, and 2–50 characters. Your dashboard shows you the exact script URL for each profile.

    If you rename a profile, update your script tag

    Renaming a profile changes its URL. Any existing &profile=OLD_NAME script tag on your site will stop loading ads. The page won't break, but no ads will show. The dashboard displays the old and new URLs side-by-side when you rename, so you know exactly what to update.

    If you only need to suppress ads on certain pages (not change settings), use page rules instead — simpler, and no extra script tags needed.

    Installing the script

    After completing the setup wizard in your dashboard, you'll get a snippet like this. It goes inside the <head> section of your page — or your layout/theme file if you want it across your whole site.

    Auto Ads snippet
    <!-- HalalSpark Auto Ads -->
    <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID&profile=YOUR_PROFILE_NAME" async></script>

    In context, it looks like this:

    Example: inside your <head>
    <head>
      <meta charset="UTF-8" />
      <title>Your Page Title</title>
    
      <!-- HalalSpark Auto Ads -->
      <script src="https://ads.halalspark.co.uk/get-auto-ads-script?websiteId=YOUR_WEBSITE_ID&profile=YOUR_PROFILE_NAME" async></script>
    </head>
    For step-by-step instructions for your specific platform, head to the relevant guide: WordPress, Shopify, Wix, Squarespace, Custom website.

    Test before going live

    Toggle test mode in your dashboard when copying the snippet. It adds &test=1 to the URL. Ads will show but nothing gets recorded — no impressions, no clicks, no budget used. Switch to the live snippet when the placement looks right.

    Changing settings later

    Edit your configuration in the Setup Ads tab on your dashboard. Changes apply immediately — the script fetches your config fresh every time it runs. No reinstall needed.

    Common questions

    Why aren't ads showing on some pages?

    Two likely causes: the page doesn't have enough content to meet the minimum threshold for your density setting, or a page rule is excluding it. Check both in your dashboard. Short pages like About or Contact are typically left alone by the script.

    Why do the ads change each time I reload?

    That's by design. The platform selects from all active, approved campaigns that match your site's category. Different ads from different advertisers will appear depending on what's currently running. They're always halal-certified.

    Will this slow my page down?

    No. The script has the async attribute, so it loads after the rest of your page content and doesn't block anything.

    Can I stop ads showing on specific pages?

    Yes — use page rules in your dashboard to exclude URLs or patterns. If you've added the script to a template file, this is the way to control it per page without touching the code. If you want different ad settings on different pages (not just on/off), use named profiles instead.

    What if I rename a profile?

    Renaming a profile changes its script URL — the &profile= value changes too. Any existing <script> tag using the old profile name will stop loading ads. The page won't break, but no ads will show — and you'll see a message in your browser's DevTools console explaining what happened. Update the script tag on your site after renaming. The HalalSpark dashboard shows you the before/after URL when you rename, so you know exactly what to change.

    Can I run Auto Ads and Manual Ads at the same time?

    Yes. They're completely independent systems. Many publishers use both — Auto Ads across most of the site, with specific Manual placements in spots they've chosen.

    What if I want to change my settings later?

    Edit your Auto Ads configuration in the Setup Ads tab on your website dashboard. Changes apply immediately — no script reinstall needed.