Please note that the clickable ad feature is only available starting with the SDK 2.3.1 and only for Android
In version 2.3 of the Admix SDK, you can set up a clickable ad feature for each banner instance. This means that whenever a player enters a banner, Admix opens a link containing that advertisement in the user's default web browser. A good click rate may bring you more demand and higher paying advertisers, resulting in more revenue.
In general the idea is as follows: every time the player is close to the banner, a button that opens the ad URL in the default browser will appear. To trigger this button we're providing a Manual trigger option. With this option you can define when the banner should generate a click button with the ad URL using Unity trigger mechanisms.
- SDK 2.3.1
- Android OS
Manual trigger setup guide
Here we'll explain how to show a button when a click is available using standard Unity triggers.
Add a clickable track UI handler to the existing banner.
Connect the clickable handler with the banner component.
Add a collider to the area where you want the Admix SDK to trigger the banner as viewed, so it will generate a click URL.
Please note, you may want to disable this collider if the banner is not filled with an ad. For this logic, you can use the "PlacementsEvent.OnShown.OnPlacementShown" event. Go here for more information: Admix events
- Create a script that identifies which banner to use and share this state to the Admix SDK:
public class AdmixTrigger : MonoBehaviour
[ ] private AdmixInteractive _interactive;
private void OnTriggerEnter(Collider other)
private void OnTriggerExit(Collider other)
In this case, we attached AdmixInteractive to the script from the targeted placement gameObject.
Please note, triggered gameObjects should contain Rigidbody and Collider elements.
Now you are sending an event, so it is time to catch it and show something on the UI - a button, for example.
Create a Canvas with a button. Keep this button disabled. It will appear when there is an ad with a click URL available and if the player triggered the collider. Feel free to customize this button however you'd like. We recommend using names such as: "click ad", "view ad" or "visit brand".
Create an empty gameObject that will be our controller for the button. Add a script component to that GameObject from the Admix SDK - AdPlacementClickUI. Then attach it to the button from step 5 with the "Button" and "Button Root" fields.
Now connect your ClickUI controller to the AdPlacementClickableTrackUI Handler.
Now everything is ready to use. Here's how it looks in action: