Conversion Tags Android

What are Conversion Tags?

The conversion tag is simply a way of performing different types of retargeting on a campaign which is running through Widespace network towards users that have opened advertiser’s tagged application. One or more tag can be implemented to track several things e,g. the different stages of application lifecycle like starting an app, completing signup or showing interest in some product or service offering. It is possible to add demography data or extra information together with the tagging event.


Application developer will find conversion tag really easy to use in their android application. From a technical point of view, Conversion Tag SDK for Android comes up with api methods on WSConversionTag class for the application developer to use. A unique tag ID ( which you can get from your main point of contact at Widespace ) needs to be provided as a parameter of tag method. If you want to connect with some sort of demography data or extra information together with the tagging event, then just call other variation of tag method and provide this information as a list of WSTagBase type for extra parameter along with unique tag ID.

Extra parameters

Parameter Description Format
city The users city, e.g. ‘Stockholm’
country The users country code(ISO 3166); e.g. ‘SE’
custom An object with data, e.g. { section: ‘sports’ }
gender The users gender ‘Male’ or ‘Female’
location The users geolocation; object with properties.
  • lat
  • long
  • accuracy
postcode The users postal code, e.g. ‘111 53’
yob The users year of birth, e.g. ‘1984’ ‘1984’

ConversionTag SDK Integration

Importing aar File

Get the latest released ConversionTag SDK for android. Extract the widespace-conversiontag-<version>-<commit_number>.aar file and drag it in the your application module’s libs folder and make it a flat directory repository so that gradle can import it for the application.

Download Conversion Tag Android SDK version 1.1.0

You can import it by the following gradle snippet in module level build.gradle file and make a gradle sync in Android Studio IDE.

repositories { 
  flatDir { 
     dirs 'libs' 

dependencies {
   //Conversion Tag SDK
   implementation 'com.widespace:*replace_with_name_of_widespace_conversion_tag_aar_file*@aar'

   //Other Dependencies
   implementation ''
   implementation ''


In your AndroidManifest.xml add the following permissions:

<uses-permission android:name="android.permission.INTERNET" />

Get Started

By now you should have been provided with the correct Conversion Tag ID(s) to use within your Tag(s).

First create an instance of WSConversionTag

WSConversionTag mWSConversionTag = new WSConversionTag(this);

Now call the tag method on this instance with unique tag ID


You can also add extra information as list of WSTagBase objects and pass it as a parameter along with unique tag ID in the overloaded tag method. But before that you need to create the list object with the data on your own. The sdk comes with a few handy classes to help you out.

  • WSCellParameter
  • WSCustomParameter
  • WSLocationParameter
  • WSWiFiParameter
//Get the list of CellInfo using TelephonyManager
List<CellInfo> cells;
WSCellParameter cellParam = newWSCellParameter(cells);

//Construct an object of WSCustomParameter with user demography data
WSCustomParameter customParam = new WSCustomParameter();
customParam.add("name", "user_name");
customParam.add("gender", "user_gender"); //Male|Female

//Get device location GooglePlayService api
Location location; 
WSLocationParameter locationParam = new WSLocationParam(location);

//Construct WSWifiParameter using WifiManager
WifiManager wifiManager;
WSWifiParameter wifiParam = new WSWifiParameter(wifiManager.getScanResults());
List<WSTagBase> extraParam = new ArrayList<WSTagBase>();
mWSConversionTag.tag("01e7d5ed-d090-4edc-a131-87b016cdfa08", extraParams);

SDK offers another method cleanUp() to clean up resource that it used for tagging purpose. You should call this method once you are done with with tagging on activity’s onDestroy() life-cycle event.

public void onDestroy()
   if (mWSConversionTag != null)

Great, your Conversion Tag(s) should now be fully setup and ready to put live on your application!

You may also want to check on below link for further guidance on how to generate your own Conversion Tag:

Questions or in need of further guidance?

Feel free to contact and we’ll do our very best to help you out!

Was this article helpful to you?

L:0 | D:0