Developer documentation

Put your first ad on a page in a few minutes, track what it sells, and read your data over the API. Your network address is https://market.biply.org/Arcline.

Quickstart

  1. Sign in as a publisher, open Sites and ad tags, add your domain and verify it with the DNS record shown.
  2. When the network approves the site, copy your ad tag.
  3. Paste it where the ad should appear.
<script async src="https://market.biply.org/Arcline/tag.js?site=YOUR_SITE_ID"></script>

Try it first, on any page

The test tag shows real running ads anywhere, including a file on your computer. It records nothing and bills nobody.

<script async src="https://market.biply.org/Arcline/tag.js?site=test"></script>

Ad units

FormatSizeWhere it works
card (default)up to 360 wideSidebars, between paragraphs
nativeup to 760 wideInside articles and feeds
leaderboard728 × 90Top of page
rectangle300 × 250Sidebars
mobile360 × 56Phone layouts
skyscraper160 × 600Wide page margins

One tag can fill many slots. Load it once and mark each position:

<div class="arcline-ad-slot" data-format="leaderboard"></div>
...
<div class="arcline-ad-slot" data-format="rectangle"></div>

<script async src="https://market.biply.org/Arcline/tag.js?site=YOUR_SITE_ID"></script>

Units are drawn in a shadow root, so your stylesheet cannot break them and they cannot restyle your page.

Video, animated and interactive adverts

Card, native, rectangle and skyscraper units can also play a silent video, tell a message in steps, or ask the reader a question. Video plays only while it is on screen and has a pause button; motion stays still for readers who ask their device to reduce it. Narrow strips show the picture instead.

Add data-style="video", "animated" or "interactive" to ask for one kind. If none is running, the slot still gets an advert.

<div class="arcline-ad-slot" data-format="card" data-style="video"></div>

The WordPress, Android and iOS packages show the picture version of every advert.

JavaScript SDK

For web apps that draw pages in the browser. Download it from Plugins and SDKs, or load it from https://market.biply.org/Arcline/tag.js?site=YOUR_SITE_ID.

<div id="ad" data-format="native"></div>
<script src="arcline.js"></script>
<script>
  Arcline.init({ baseUrl: 'https://market.biply.org/Arcline', siteId: 'YOUR_SITE_ID' });
  Arcline.render(document.getElementById('ad'));
</script>

Draw it yourself

Arcline.request().then(function (response) {
  if (response.ad) console.log(response.ad.headline, response.ad.image);
});

If you draw your own unit, record the click by submitting a POST form to ad.clickUrl with the field clickToken.

WordPress

  1. Download the plugin from Plugins and SDKs. Your address and site ID are already filled in.
  2. In WordPress: Plugins, Add New, Upload Plugin, then activate.
  3. Settings, Arcline Ads: choose automatic placement, or use the shortcode or widget.
[arcline_ad]

Shopify

  1. Online Store, Themes, Edit code. Add a new section called arcline-ad.
  2. Paste in sections/arcline-ad.liquid from the download.
  3. In the theme editor choose Add section, then Arcline ad.

Ghost

Without theme changes, paste html-card.html into an HTML card. For every post, copy partials/arcline-ad.hbs into your theme and add:

{{> "arcline-ad"}}

Android (Kotlin)

Copy com/arcline/ads into src/main/java and allow internet access.

<uses-permission android:name="android.permission.INTERNET" />
val ad = ArclineAdView(this)
container.addView(ad)
ad.load()

Use a PNG, JPG or WebP creative: Android and iOS do not draw SVG images.

iOS (Swift)

In Xcode: File, Add Package Dependencies, Add Local, then pick the downloaded folder.

import ArclineAds

struct ArticleView: View {
    var body: some View {
        ArclineAdView()
    }
}

Conversion tracking

Every billed click adds a signed arc_click value to your landing page address. Report a sale against it within 30 days.

On your web page

Add the script to your landing and thank-you pages, then call track when the sale happens. Use your landing page's own domain.

<script src="https://market.biply.org/Arcline/conversion.js"></script>
<script>
  ArclineConversions.track({ value: 49.90, orderId: 'ORDER-1042' });
</script>

From your server

The most trustworthy method. Keep the campaign's conversion key on the server and never place it in a web page. It is shown once when the campaign is created.

curl -X POST https://market.biply.org/Arcline/api/conversions \
  -H "Accept: application/json" \
  -d campaignId=12 \
  -d clickRef=THE_ARC_CLICK_VALUE \
  -d conversionKey=$ARCLINE_CONVERSION_KEY \
  -d requestKey=ORDER-1042 \
  -d valueCents=4990

Sending the same requestKey again is safe: it is counted once.

Reporting

The advertiser dashboard shows impressions, clicks, click-through rate, spend, conversions and conversion value for 7, 30 or 90 days. The same figures are available from GET /api/v1/reports.

REST API

Create a token under API access and send it as a bearer token. Tokens are shown once, expire, can be revoked, and only carry the abilities you tick.

curl https://market.biply.org/Arcline/api/v1/reports?days=30 \
  -H "Authorization: Bearer $ARCLINE_TOKEN" \
  -H "Accept: application/json"
EndpointAbilityReturns
GET /api/v1/campaignscampaigns:readYour campaigns
POST /api/v1/campaignscampaigns:writeCreates a campaign for review
GET /api/v1/sitessites:readYour sites
POST /api/v1/sitessites:writeAdds a site
GET /api/v1/ledgerledger:readBalance movements
GET /api/v1/reportsreports:readDelivery and conversions

Create a campaign

curl -X POST https://market.biply.org/Arcline/api/v1/campaigns \
  -H "Authorization: Bearer $ARCLINE_TOKEN" -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"Winter sale","headline":"Winter sale starts today",
       "body":"Up to 40% off this week.","destinationUrl":"https://shop.example.com",
       "bidCpcCents":45,"dailyBudgetCents":2000}'

Errors use standard status codes: 401 bad token, 403 missing ability, 422 invalid input, 429 too many requests (120 a minute).

Security

  • Ads are served only to approved, verified domains, over HTTPS.
  • Each click needs a single-use token that expires after 30 minutes. A visitor is billed at most once per campaign every ten minutes.
  • Conversion references are signed, so they cannot be made up.
  • Only hashes of API tokens, click tokens and conversion keys are stored.
  • Public ad requests set no cookies. Set window.arclineConsent = true when your visitor has agreed to measurement.
  • Every money movement is a balanced double-entry record.

Troubleshooting

What you seeWhat to check
No ad appearsOpen the browser console for a line starting "Arcline:". Try site=test to confirm the script loads.
Request refused (403)The page's domain must match the approved site, over HTTPS.
Site not found (404)Check the site ID and that the site is approved.
Blocked by your security policyAllow https://market.biply.org/Arcline in script-src, connect-src, img-src and form-action.