Starting with Custom Ad Provider in Ads iOS SDK
Custom Ads give you the power to run any Ad provider, or any Ads, in StorifyMe experiences.
Custom Ad Fields
It's important to note that every Custom Ad has the following fields (you can see in the image above where the fields will show up):
A unique identifier for the advert.
The name of the Advertiser or title of the advert. This is displayed to the user at the top left of the screen.
Creative type can be either
display for an Image Ad or
video for a Video Ad.
VideoURL (required if CreativeType = video)
A URL to a video that should be used as the creative for the ad.
Note that only one of
Image should be set corresponding to the value of the
The duration of the video ad is the video length.
Image (required if CreativeType = display)
An image to be used as the creative for the ad. The duration for image ads is 7s by default.
TrackingURL (sometimes required)
An impression tracking URL for the advert (need to add a pixel with this USD to the ad).
StorifyMe will make a
GET HTTP call to the provided
TrackingURL with query parameters showing the Ad config once the ad is displayed.
This field is required if a 3rd party impression tracker is needed.
Directs the user to the URL specified using an in-app browser / OS browser / deep link in the app.
Defines the call to action text, This defaults to
"Swipe Up" if not supplied.
If true, any click on the video/image should open the
ClickURL, default is false.
Set the duration of the ad, overriding the default value of 7 seconds. Please provide this value when you provide
CreativeType = video.
Configuring the Custom Ads in StorifyMe
To enable StorifyMe Custom Ads in your stories, please go to the Ads configuration, enable ads and select
Custom Ad Source as a provider.
You can also configure this on a Widget level in the Widget editor.
This process is explained in more depth in the StorifyMe Widget Editor explanation page.
Please go there to read more if you have not already configured a widget.
Showing Custom Ads in the Widget
To show Custom Ads in the Widget, all that has to be done is to provide the array of Custom Ads to the Widget (as described in the previous step).
For example, here is a small piece of code that is used to show Custom Ads in the Widget.
First, we need to add the widget HTML on the page.
This process is explained in more depth in the Starting with iOS SDK for Stories.
Please go there to read more if you have not already embedded a widget.
let storifyMeWidget = StorifyMeWidget()
// Load widget id
// Load custom ads to the Widget and show them
id: 1, // A unique identifier for the advert
advertiserName: "Brand Name 1",
videoURL: "https://cdn.storifyme.com/...", // Example video URL, please change with yours
trackingURL: "https://example-ad-server.com/events", // An example impression tracking URL for the advert
clickURL: "https://www.storifyme.com/?rel=example-story-ad", // Example ad url directs the user to the url specified using browser
clickThroughCTA: "Learn More", // Defines the call to action text, This defaults to “Swipe Up” if not supplied.
fullScreenCTA: true, // If true, any click on the video/image should open the ClickURL, default is false
adDuration: 10 // Set the duration of the ad, overrides default value of 7 seconds
advertiserName: "Brand Name 2",
imageURL: "https://www.imagineforest.com/....", // Example image url, please change with yours
clickThroughCTA: "Learn more",
// Load widget
Please make sure that you provide enough ads to the Widget so all of the slots can show. Otherwise slots that do not have an add for it will be hidden and the user will not see them.
After this setup is done, you are ready to show ads to your users. 🎉
Please, reach out to StorifyMe team if you need help with any of the steps.