App Native Carousel

App Native Carousel is a multi-slide ad format. This format is native, so you can customize your carousel navigation elements such as arrows and switches to match the design of your app.

Slides are banners from different campaigns. You set up these banners in a special way to upload them to a carousel.

To display a carousel, create and add the following in the same placement:

  • The main campaign with the Carousel profile and carousel design settings.
  • Additional campaigns with the Direct sale profile and specific banner templates.

Slide banners of direct sales campaigns are displayed in one carousel according to the banner design settings you specified in the campaign with the Carousel profile.

To learn how to set up the carousel format for your site, see Adfox Help.

Format specifics

  • In a carousel, you can choose from two to 10 slides.

  • A single position in a carousel is a single slide from one campaign.

  • You can set up each slide to target specific audience segment.

  • Slide positions are defined by their campaign levels and priorities.
    If Adfox can't pick up a slide for a certain position (for example, if a campaign is over or there are no active banners), it displays the slide with a lower priority in this position.

  • Statistics are available for the entire carousel as well as its slides.

Here is an example of populating a three-slide carousel that targets users in Moscow:

Adding a banner to Adfox

Step 1. Create a master slider of the carousel

  1. In the Yandex Advertising Network interface, create an ad unit of the Native design format and connect it to Adfox. After that, a placement with the linked ad unit appears in the Adfox interface.
  2. Create a Guarantee campaign with the Carousel campaign profile. To learn more about profiles, see Campaign profile.
  3. In the campaign settings, go to Banners and click Add.
  4. Choose the Mobile Advertising App banner format, the App Mobile Native banner type, and the App Native Carousel template.
  5. Set the number of slides from 2 to 10.
  6. Under Placement, select a placement for the banner.

Step 2. Set up the carousel contents

  1. Create a Guarantee campaign with the Direct sale campaign profile. Under Placement, select the placement set up for the carousel.

    Warning

    Make sure to place your slides on the same placement as the master slider of the carousel.

  2. Go to the form for adding a banner. Choose the Mobile Advertising App format, the App Mobile Native banner type, and the Media Native Slide template.

  3. Set up the banner parameters and click Save.

Step 3. Load a slider

To load the native ad slider, create a SliderAdLoader object.

The ad request parameters are configured via the NativeAdRequestConfiguration.Builder class object. In request parameters, you can pass ad unit ID, image loading method, age, gender attributes, and other data that can make impressions more relevant.

For rendering in Adfox, add the placement Parameters values to the nativeAdRequestConfiguration object.

To receive notifications with ad loading results, create a SliderAdLoadListener instance. Set this instance to listen to events of ad slider loader.

To load the ad, call the loadAd() method.

The example below shows how to load native ads from Activity:

class AdfoxSliderActivity : AppCompatActivity(R.layout.activity_adfox_slider) {

    private var sliderAdLoader: SliderAdLoader? = null

    private lateinit var binding: ActivityAdfoxSliderBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityAdfoxSliderBinding.inflate(layoutInflater)
        setContentView(binding.root)

        sliderAdLoader = createSliderAdLoader()
        sliderAdLoader?.loadSlider(
            // Here you can use methods of the NativeAdRequestConfiguration.Builder class to set specific parameters.
            NativeAdRequestConfiguration
            .Builder("your-ad-unit-id")
            .setParameters(mapOf("adf_ownerid" to "xxxx", "adf_p1" to "xxxx")
            .build()
        ))
    }

    private fun createSliderAdLoader(): SliderAdLoader {
        return sliderAdLoader ?: SliderAdLoader(this).apply {
            setSliderAdLoadListener(object : SliderAdLoadListener {
                override fun onSliderAdLoaded(p0: SliderAd) {
                    // The slider ad is loaded successfully. Now you can show the loaded ads.
                }

                override fun onSliderAdFailedToLoad(p0: AdRequestError) {
                    // Ad failed to load with the AdRequestError.
                    // Attempting to load a new ad from the onAdFailedToLoad() method is strongly discouraged.
                }
            })
        }
    }
}
class AdfoxSliderActivity extends AppCompatActivity {

    @Nullable
    private SliderAdLoader mSliderAdLoader = null;

    private ActivityAdfoxSliderBinding mBinding;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = ActivityAdfoxSliderBinding.inflate(getLayoutInflater());
        setContentView(mBinding.getRoot());

        mSliderAdLoader = createSliderAdLoader();
        if (mSliderAdLoader != null) {
            // Here you can use methods of the NativeAdRequestConfiguration.Builder class to set specific parameters.
            mSliderAdLoader.loadSlider(
                    new NativeAdRequestConfiguration
                        .Builder("your-ad-unit-id")
                        .setParameters(new java.util.HashMap<String, String>() {{
                            put("adf_ownerid", "xxxx");
                            put("adf_p1", "xxxx");
                        }})
                        .build()
            );
        }
    }

    private SliderAdLoader createSliderAdLoader() {
        if (mSliderAdLoader != null) {
            return mSliderAdLoader;
        }

        final SliderAdLoader newSliderAdLoader = new SliderAdLoader(this);

        newSliderAdLoader.setSliderAdLoadListener(new SliderAdLoadListener() {
            @Override
            public void onSliderAdLoaded(@NonNull SliderAd sliderAd) {
                // The slider ad is loaded successfully. Now you can show the loaded ads.
            }

            @Override
            public void onSliderAdFailedToLoad(@NonNull final AdRequestError error) {
                // Ad failed to load with the AdRequestError.
                // Attempting to load a new ad from the onAdFailedToLoad() method is strongly discouraged.
            }
        });
        return mSliderAdLoader;
    }
}
  1. Create an instance of the NativeAdLoader class to receive ads in the slider.

  2. Create a configuration for the nativeAdRequestConfiguration request using the NativeAdRequestConfiguration class. In request parameters, you can pass ad unit ID, image loading method, age, gender attributes, and other data that can make impressions more relevant.

    For rendering in Adfox, add the placement Parameters values to the nativeAdRequestConfiguration request.

  3. Set a delegate for receiving ads that implements the NativeAdLoaderDelegate protocol.

  4. To track the ad loading process, implement the following methods of the NativeAdLoaderDelegate protocol: -nativeAdLoader:didFailLoadingWithError:, -nativeAdLoader:didLoadAd:.

  5. Send the loadAdWithRequestConfiguration: message to the loader to load the ads.

  6. If the ads are loaded, the following method is called:

    func nativeAdLoader(_ loader: NativeAdLoader, didLoad ad: NativeAd)
    
  7. If the ads failed to load, the following method is called:

    func nativeAdLoader(_ loader: NativeAdLoader, didFailLoadingWithError error: Error)
    
Sample generic ad request
// Creating a loader
adLoader = NativeAdLoader()
adLoader.delegate = self

// Creating Adfox request parameters
var parameters = [String: String]()
parameters["adf_ownerid"] = "xxxxxx"
parameters["adf_p1"] = "xxxx"

// Creating the request configuration
let requestConfiguration = MutableNativeAdRequestConfiguration(adUnitID: "<AdUnitID>")
requestConfiguration.parameters = parameters

// Passing the request configuration to the loader
adLoader.loadAd(with: requestConfiguration)

// Implementing the delegate's methods
// ...

func nativeAdLoader(_ loader: NativeAdLoader, didLoad ad: NativeAd) {
    // Display the ads here
}

Step 4. Set up slider display

To learn how to render the slider, see Rendering a native ad slider:

Ad labeling

You can place ads from different advertisers within the same carousel and submit these ads to the state register (ERIR, Unified Register of Online Advertising) under separate contracts with end advertisers. Each position is a unique banner from its own campaign.

In carousels, you can label only slide banners. You can't enable labeling in a master slider with the Carousel profile.

Statistics

Banner statistics are collected at multiple levels:

Go to the level of a campaign with the Carousel profile. Open the Reports tab and select the By campaigns in Carousel or By Carousel positions report.

Go to the level of a campaign with the slide. Open the Reports tab and select the By banners slides in Carousel report.

Reports are not available for campaigns that don't have slide banners.

Go to the slide level, open the Reports tab, and then select the By positions in Carousel report.

You can't choose groupings for preset reports.

To analyze metrics grouped by events in a custom report, add the Bulk formats → Position grouping when creating the report.

Note

When you add the Splits by banners grouping, position metrics are calculated for a banner in a certain place if this banner was served in two or more positions.

Contact support