⏩Start Here
Welcome! This guide will help you start running ads on your website or mobile app.
1. Onboarding
To get started, please reach out to the Spindl team to get your account approved as a Publisher. As part of that, you will need provide a Wallet Address for earnings to be sent to.
2. Set up a placement
Next, you'll need to set up at least one Placement. A placement is simply a place in your app where you show an ad - you can create as many as you need. When you create a Placement, you need to pick a Creative Type (full list here).
If you need a custom creative type for your placement, reach out to the Spindl team, and we can create it for you.
3. Technical Integration
There are three ways to integrate ads into your product. Most customers prefer the API approach for native integrations, and the React SDK for simple image-based ads.
To use the API, you must first generate a Publisher API Token (you can find that on the Settings screen).
This API Token should be treated as a secret, and not shared in any public-facing code.
Next, there are two APIs you will need to call.
Fetch Recommendations
GET
https://e.spindlembed.com/v1/render/{publisher_id}
Headers
X-API-ACCESS-KEY
: Publisher API Key, from the Settings tab
Path Params
publisher_id
: Text, provided by the spindl team
Required URL Params
placement_id
: Text, from the Placements tabaddress
: Text, the wallet address, in the form of 0x...limit
: Numerical, the number of recommendations to return (usually this is 1)
Optional URL Params
chain_id
: Numerical, the chain ID where this unit is being rendered
Response:
{
"items": [
{
"id": string,
"impressionId": string,
"type": string, // specifies format of unit (card, iframe, discord)
"title": string,
"context": { // reason for returning unit (social context, onchain activity)
"text": string
},
"description": string,
"imageUrl": string,
"imageAltText": string,
"ctas": [
{
"title": string,
"href": string
}
]
},
...
]
}
Post Impressions (record anytime a recommendation is shown on screen)
POST
https://e.spindlembed.com/v1/external/track
Headers
X-API-ACCESS-KEY
: Publisher API Key, from the Settings tab
Body (JSON)
type
: Text, should beimpression
orclick
impression_id
: Text, theimpressionId
from the API above
Response: Status Code 200
Last updated