How to add an ad removal button

AdDuplex ad control allows the developers to implement ad removal buttons. These can be beneficial in a number of ways – in terms of both customer satisfaction and monetary gain. For example, developers often employ a freemium monetization model where users are offered to buy an ad free version of the app.

Normally the ad control checks whether it is covered by other elements, but there is an exception. Some space on the top-right corner of the control is dedicated for your button.  You can see it in the Visual Studio or Expression Blend Designer view if you set the IsTest property to True.

There are a few caveats with the actual button implementation. Windows Phone Silverlight apps are a breeze to work with in this regard, because of how it manages pixels. In Universal Apps it’s a lot more complicated (not for long though).

We will demonstrate how to do it properly. For the sake of simplicity our ad removal button is going to be represented by a red rectangle. Following are two solutions, each for it’s own platform.

For Windows Phone Silverlight apps

This is the easier of the two. You get a 40x40px gap. Just put your button in it. 

1. Set IsTest to true

   1: <ad:AdControl IsTest="True"/>

2. Using the Visual Studio Designer as your guide position your button where you want it. Make sure you leave out the green area. If you fail to do that, the ad control will complain about it being covered and will not log impressions.

rectanglePositionedInDesigner

For Universal Apps

Sizing in Universal apps is trickier because of the use of effective resolution. Width and height no longer is represented in mere raw pixels. If you would set your ad removal button statically, it would not behave identically on all devices. You have to be more dynamic in Universal apps. Here is how:

1. Put both ad control and the button in a Grid panel. Bind Width and Height properties of the grid to those of the ad control (since it will resize dynamically). Align the button to the top-right corner of the grid.

<Grid x:Name="advertisingGrid" 

      Width="{Binding ElementName=adControl, Path=ActualWidth}"

      Height="{Binding ElementName=adControl, Path=ActualHeight}">

    <ad:AdControl x:Name="adControl"/>

    <Rectangle x:Name="closeButton" 

               Fill="Red"

               HorizontalAlignment="Right" VerticalAlignment="Top"/>

</Grid>

2. In code behind add the following method. It will calculate the proper button size.

private Size GetCloseButtonSize()

{

    var bounds = Windows.UI.Xaml.Window.Current.Bounds;

    var orientation = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().Orientation;

    var result = new Size();

 

    switch (orientation)

    {

        case Windows.UI.ViewManagement.ApplicationViewOrientation.Landscape:

            result.Width = bounds.Height;

            result.Height = bounds.Width;

            break;

        case Windows.UI.ViewManagement.ApplicationViewOrientation.Portrait:

            result.Width = bounds.Width;

            result.Height = bounds.Height;

            break;

        default:

            result.Width = bounds.Width;

            result.Height = bounds.Height;

            break;

    }

 

    result.Height = result.Width / 6.0f;

    result.Height = 35.0f * result.Height / 80.0f;

    result.Width = 35.0f * result.Width / 480.0f;

 

    return result;

}

3. In the constructor, after this.InitializeComponent() is called, use the GetCloseButtonSize() method to resize your button:

var closeButtonSize = GetCloseButtonSize();

 

this.closeButton.Height = closeButtonSize.Height;

this.closeButton.Width = closeButtonSize.Width; 

 

That’s it.

We’ve addressed the issue that this is more complex than it could be. A better solution is in the making along with more new features that we are very excited about.

Introducing conversion tracking (attribution)

Up to now you were able to see how many times your ads are shown in other apps and how many clicks they get. Monitoring your click-through rate can give you a good idea of which ad copy attracts user attention better and optimize your ads and campaigns. But whatever happened after the click was a mystery.

You had to rely on trying to deduct the effectiveness of your ads from the changes in your download numbers and, unless you were dedicating substantial budgets, it was really difficult to distinguish between the effect of your ads and organic fluctuations.

Today I’m happy to announce the immediate availability of our conversion tracking feature.

image

As you can see from the screenshot the feature is still in beta and is only available for Windows Phone apps and campaigns running AdDuplex SDK v.2 or higher.

How does it work?

Since the Windows Phone platform doesn’t provide reliable means to track users across apps, we had to implement our own “fingerprinting” technology to match those clicks to installs they generated using a set of secondary environment factors. For this reason the system cannot be 100% accurate.

Through our internal testing over the last couple of months we observed 85-90% accuracy. Finding the balance between false positives (attributing installs to wrong clicks) and false negatives (not attributing installs to clicks that generated them for some reason) was tough and we decided that we would rather underreport the installs than attribute conversions that didn’t happen. So when you look at the conversion stats it is safe to assume that the actual number is about 10% higher.

What information can I get from these stats?

For apps you can see the number of conversions and click-to-install ratio (so called install rate or IR).

For campaigns you get the number of conversions and IR, plus you get the same for each individual ad – so you can choose a perfect ad copy easier. We will also show you your cost-per-install so you can evaluate the effectiveness of your whole user acquisition strategy.

image

OK, what do I need to do to start seeing these stats?

Well, if you are doing cross-promotion using our SDK v.2 or higher AND you are promoting the same app as the one showing the ads AND you are using AdDuplex exclusively AND you are showing AdDuplex ads on the first/main page of your app, then you are all set and you don’t have to do anything else.

If you are doing cross-promotion targeting another app you have to make sure that the target app either uses AdDuplex exclusively and shows AdDuplex ad on the first page of the app, or you have to implement our tracking code into the target app (see below for the details).

For advertising campaigns you have to implement ads OR tracking code into your target app and you have to use direct store links as your campaign targets (you can’t use shortened URLs and other 3rd party URLs for now)

Implementing the tracking code

Your target app doesn’t have to participate in the AdDuplex cross-promotion network to take advantage of the conversion tracking feature. You just have to register the app in our system and call one method when your app launches. Something like this:

AdDuplex.AdDuplexTrackingSDK.StartTracking(“YOUR_AppId_HERE”);

The actual namespace varies a little depending on the development platform. Please see our Getting started guides for each specific platform for details.

Important: you have to call this method in cross-promotion apps too if they are not 100% AdDuplex

What’s next?

We will continue improving the algorithm to get you more accurate results. We will also bring conversion tracking to the Windows side of AdDuplex.

I hope that you find this feature useful and we would love to hear your thoughts on this feature in the comments below or via email at info@adduplex.com.