About AdShuffle
AdShuffle allows you to manage banner rotation based on frequency and date range settings. You can also enable automatic rotation with a set interval. Below are examples showcasing different cases and configurations.
How to Add AdShuffle to Your Page
To use AdShuffle on your website, simply add the following script tag to your HTML file:
<script src="https://ad-shuffle.codions.dev/dist/ad-shuffle.es.js"></script>
This script will enable the functionality of banner rotation, allowing you to define banners with frequencies, start and end dates, and more.
Example 1: Sequential Auto-Rotation Every 3 Seconds
This container rotates banners automatically every 3 seconds, in sequential order.
Example 2: Random Auto-Rotation Every 5 Seconds
This container rotates banners automatically every 5 seconds, with random selection.
Example 3: No Auto-Rotation (Random Initial Selection)
This container selects a random banner initially, based on the defined frequencies, but does not rotate automatically.
Example 4: Equal Frequencies
This container displays banners with equal frequencies (33%).
Example 5: Dynamic Ad Zone Loaded from Endpoint
This example demonstrates how to use the AdShuffle SDK to load an ad dynamically from an external endpoint. The ad content is fetched and displayed within the specified container.