Conversion Tags iOS

What are Conversion Tags?

Conversion Tag is a tag designed for advertisers to be able to do different types of retargeting on their campaigns running through Widespace network, towards users that have started tagged apps. One or more tag can be created for the different stages of application lifecycle like starting an app, completing signup or showing interest in some product or service offering etc. It is possible to add demography data or extra information together with the tagging event.

Usage

This framework is easy to use. You just need to provide a unique tag (You receive unique tag by contacting Widespace) to the ‘+tag:’ method. If you want to connect some sort of demography data or extra information together with the tagging event, you can do so by calling ‘+tag:withExtras:’ and provide an array of extra objects.

ConversionTag SDK Integration

Add the the framework ‘ConversionTag.framework’ to your project by dragging it to the ‘Frameworks’ folder found in the ‘Project navigator’ of your Xcode project.

iOS ConversionTag SDK version 2.1.0 download

Requirements

You need to add ‘AdSupport’ and ‘SafariServices’ framework. The ‘SafariServices’ framework can be weak linked to only be active on iOS 9 and above but still allow you to run the app on older devices.

Get Started

Import ConversionTag framework.

#import <ConversionTag/WSConversionTag.h>

Call tag method with unique tag (You receive unique tag by contacting Widespace).

[WSConversionTag tag:@"21EB9D51-FED1-45D9-A550-688F6F289DB5"];

You can also add an array of extra objects with the tag event. Create extra objects with demography data like location & custom data.

// Get currentLocation from device location with CLLocationManager
CLLocation *currentLocation;
WSTagLocation *location = [WSTagLocation tagWithLocation:currentLocation];

WSTagCustom *custom = [WSTagCustom tagWithJSONDictionary:@{ @"user" : @"123", @"section" : @"sports" }];

Call tag method with extra objects.

[WSConversionTag tag:@"21EB9D51-FED1-45D9-A550-688F6F289DB5" withExtras:@[ location, custom ]];

You can check the result of tag method by using completion block.

[WSConversionTag tag:@"21EB9D51-FED1-45D9-A550-688F6F289DB5" withExtras:@[ location, custom ] completion:^(BOOL success, NSError *error) {
    if (error) {
        NSLog(@"%@", error.localizedDescription);
    }
}];

Extra parameters

Parameter Description Format
city The users city. ‘Stockholm’
country The users country code(ISO 3166).    ‘ SE’
custom A dictionary with data. { section: ‘sports’ }
gender The users gender. ‘Male’ or ‘Female’
location The users geolocation. CLLocation object.
postcode The users postal code. ‘111 53’
yob The users year of birth. ‘1984’

 

Example

#import <ConversionTag/WSConversionTag.h>

- (void)tag
{
    CLLocation *wsLocation = [[CLLocation alloc] initWithCoordinate:CLLocationCoordinate2DMake(59.3318835, 18.0662123) altitude:17 horizontalAccuracy:0.35 verticalAccuracy:1.0 timestamp:[NSDate date]];
    WSTagLocation *location = [WSTagLocation tagWithLocation:wsLocation];

    WSTagCustom *custom = [WSTagCustom tagWithJSONDictionary:@{ @"user" : @"123", @"section" : @"sports" }];
    
    [WSConversionTag tag:@"21EB9D51-FED1-45D9-A550-688F6F289DB5" withExtras:@[ location, custom ] completion:^(BOOL success, NSError *error) {
        if (error) {
            NSLog(@"%@", error.localizedDescription);
        }
    }];
}

Questions or in need of further guidance?

Feel free to contact integrations@widespace.com and we’ll do our very best to help you out!

Was this article helpful to you?

L:0 | D:0