How to make custom native in-feed ads

In-feed ads are ads that appear to look like one of the items listed on a page, AKA a feed. You can make it look like the teaser to a blog post or a description of a product or service. This way, you can make it blend in with the rest of the content. You can use native templates to create in-feed ad items that are tailored to your needs.

A sample in-feed ad

This feature requires the Enhanced Ads add-on. For more information on adding add-ons to your subscription, read How to change your subscription.

In this guide, we're going to create a simple in-feed ad using a custom native ad template. This type of native template has all the code - HTML, JavaScript, and CSS - necessary to display the ad properly.

If you'd rather sanitize the template and have only HTML inside it, you should make your in-feed ad using a styled native ad template instead. For more information on the differences between custom native ads and styled native ads, read About native ad templates.

Templates for custom native ad items are not compatible with styled native ad items, and vice-versa.

You will learn:

  1. How to create a template for a custom in-feed ad. You can customize the sample code to fit your needs.
  2. How to create a custom in-feed ad item once you have a custom in-feed template.

How to create a custom in-feed ad template

This template will require the user to provide the URL to where the image creative is hosted when creating the in-feed ad item. There are also text fields for the header and the body text that need to be filled.

  1. Click Native Ad Templates in the left navigation menu to go to the Templates section.
  2. Click Add Native Ad Template in the Native Ad Templates table. The New Native Template window will appear.
  3. Click Custom Rendering/API. The New Native Ad Template page will appear.

Selecting a native template type

  1. Name the template, then add an image URL variable and two text variables (one for the header and one for the body text). In our sample code, we called these variables ImageURL, Main Heading, and Body, respectively.
For templates that have multiple variables such as this one, you can drag the icon on the far left of each variable field up or down to reorder your variables.

Creating an in-feed ad custom native template in AdButler

You can save variables and use them in other templates. After adding a variable, click on the three dots at the far right of the variable fields then click Save Variable as Template. To use a saved variable, click Add Saved Variable while creating a native template.
  1. Enter the code in the HTML Template (Custom Rendering) field, then click Save Changes.

Here's the code we used in our example:

<!DOCTYPE html>
<html lang="en">
            .in-feed-container {
                position: relative;
                float: left;
                width: 604px;
                border: 1px solid #ececec;
                padding: 12px;

            .in-feed-image-container {
                width: 220px;
                height: 180px;
                float: left;

            .in-feed-image {
                height: 100%;
                width: 100%;
                object-fit: cover;

            .in-feed-content-container {
                width: 360px;
                height: 141px;
                float: left;
                margin-left: 20px;

            .in-feed-content-header, .in-feed-content-link {
                color: #383838;
                text-decoration: none;
                margin-top: 0;
                margin-bottom: 10px;
                line-height: 1.4em;

            .in-feed-close-button-container {
                position: absolute;
                top: 2px;
                right: 2px;
                cursor: pointer;

            .in-feed-close-button {
                width: 18px;
                display: inline-block;
                text-align: center;
                color: #ffffff;
                border-radius: 18px;
                background: #000000;
                user-select: none;
        <div class="in-feed-container">
            <div class="in-feed-image-container">
                <a href="[TRACKING_LINK]">
                    <img class="in-feed-image" src="[%ImageURL%]">
            <div class="in-feed-content-container">
                <a href="[TRACKING_LINK]" class="in-feed-content-link">
                    <h2 class="in-feed-content-header">
                        [%Main Heading%]
                <p class="in-feed-content-body">
            <div class="in-feed-close-button-container">
                <span class="in-feed-close-button" onclick="closeButton()">×</span>
            function closeButton() {

You can now use this template to create a custom in-feed ad item.

Back to top

How to create a custom in-feed ad item

  1. Go to the section of the relevant zone (Your AdButler > Publishers > Your Publisher > Your Zone) or campaign (Your AdButler > Advertisers > Your Advertiser > Your Campaign).
Custom native ad items can be assigned only to Standard zones or to Native zones. For Standard zones, the zone size must be set to Dynamic. For Native zones, the Enable Custom Rendering option must be turned on. Both the zone size and the custom rendering option can be configured only when creating a zone and cannot be changed afterward.
  1. Click Add Ad Item in the Ad Items table. The Add Ad Item window will appear.
  2. Click Native (Custom Rendering/API). The New Ad Item page will appear.

Creating a native (custom rendering/API) ad item

  1. Set the ad item's size.
  • If the ad item or its campaign will be assigned to a Standard zone, you must set the ad item's size to Dynamic.

  • If the ad item or its campaign will be assigned to a Native zone, you must enter the ad item's exact size. You can do this either by selecting Preset Size and then selecting the matching width and height values from the dropdown menu, or selecting Custom Size then entering the values in the fields that appear.

  1. Select your in-feed custom native ad template in the Template dropdown menu.
  2. Fill in the rest of the fields as needed, including the image URL and text fields. If you entered a destination URL, you can test it by clicking Open Destination URL to the right of the field.
  3. Click Save Ad Item.

Creating a custom in-feed ad item in AdButler

Back to top

Can't find what you're looking for?

Send us an email

Visit the blog

For more ad serving tips, industry news and AdButler insights.