Thank you for your interest in Adwords Mobile Apps Conversion Tracking and Remarketing For Unity.
You can get it from unity asset store here
This is a simple usage guide and tutorial.
Full documentation can be found here.

Admob may not be the best gaming ad network out there, but it’s definitely useful as auxiliary ad network for your games.
Admob or adwords has a re-marketing functionality that you can use to increase engagement in your app.
Unlike some other networks based on CPI, in Admob you can tag users who took a certain action inside you app, and serve a special advertisement to them with a deep link to content related to this advertisement.
To measure deeplink installs, and conversion you can use our asset that integrates Adwords Mobile Apps Conversion Tracking and Remarketing to unity.

Creating Admob Application

First we need to setup our program in admob.
Make sure you are in the “Promote” tab of admob and start by clicking the “Promote new app” button if you have not done so already.

admob create new app

admob create new app

After creating the app, select it and go to the “Conversions” tab, and create the download conversion, then in app purchase conversion for your Android and iOS apps.

Admob conversoin setup

Admob conversoin setup

Please take a note of the code for each conversion (except Android download, which might not have a code)
The code should look something like this.

Admob conversion code

Admob conversion code

If you forgot to take a note of the code, you can always go to the “Conversions” tab, hover your mouse over the conversion you need, then click on the Edit button that will appear.

Integrating SDK and reporting conversion

OK, now we are ready to integrate the sdk into our project. Import the .unitypackage file into unity.

Please make sure to call AdWordsConversionReporter.Init as early as possible and before calling anyother method from AdWordsConversionReporter class.

Init( string androidTrackingID, bool enableTracking, string iOSTrackingID, string iOSInstallTrackingLabel, string iOSInstallTrackingValue)

Here’s how to get the parameters needed for that method.

  • androidTrackingID
    • After creating Android in-app conversion, you will have a code like this AdWordsConversionReporter.reportWithConversionId(this.getApplicationContext(),
      “androidTrackingID”, “label”, “3.00”, true); use the second parameter here.
  • enableTracking
    • If you need Adwords tracking sdk to track the user actions just enable this option. Learn more at the official documentation.
  • iOSTrackingID
    • After creating iOS download, you will have a code like this [ACTConversionReporter reportWithConversionID:@”iOStrackingid” label:@”label” value:@”0.50″ isRepeatable:NO]; use the first parameter here.
  • iOSInstallTrackingLabel
    • Use the second parameter from the iOS download conversion code.
  • iOSInstallTrackingValue
    • The third parameter from the iOS download conversion code.

This method will take care of download conversions for both Android/iOS for you.

Next we need to track in-app purchases.

We have two methods for this purpose, one for Android and one for iOS. You can use both without putting a condition for compilation and they will be handled correctly.

AdWordsConversionReporter.reportConversionIOS(string label, string value, bool repeatable)

AdWordsConversionReporter.reportConversionAndroid(string label, string value, bool repeatable)

  • label
    • Is the 3rd parameter you get from the admob in-app purchase tracking code.
  • value
    • Is the 4th parameter
  • repeatable
    • Is the 5th parameter. If you are getting a code for iOS, please make NO as false, and YES as true.

Now we are all set for download and in-app purchase conversion for both Android and iOS.

Please note that you can also track custom conversion from Adwords using the same methods from above, but this is not covered in this tutorial. You can find more information here.

Building for iOS

When building for ios, please add -ObjC to the Other Linker Flags in xCode.

Checking if conversion is working

When you go into your app and carry out the conversion event that you’ve defined, you should see messages similar to the following logged at the Info level:

I/GoogleConversionReporter( 1557): Pinging: [...]

I/GoogleConversionReporter( 1557): Ping responded with response code 200

The HTTP 200 response code indicates that the conversion was successfully reported to Google AdWords.

The first time you run your app after adding the conversion tracking snippet, you should see messages similar to the following logged to your console, indicating that your app is successfully tracking downloads:

ConversionExample[9412:c07] ACTConversionReporter: Sending ping with IDFA: [...]

ConversionExample[9412:c07] ACTConversionReporter: Ping successful.

The next time you run your app, these types of messages indicate the download tracking snippet already fired once (the first time the app was opened after being downloaded) and does not need to fire again:

ConversionExample[2618:c07] ACTConversionReporter: Already sent successful ping with IDFA and conversion label abCDEFG12hIJk3Lm4nO.

If you’re tracking other conversion events in your app, you should see messages logged for those events each time they occur.

Re-marketing Report

You can tag a user taking a certain action and report this to Adwords Remarketing using the following method.

AdWordsConversionReporter.reportRemarketing(Dictionary<string, string> parameters)

Example

var dic = new Dictionary<string, string>();
dic["eventtype"] = "login";
dic["user_language"] = languagePrefix;
dic["version"] = GAME_VERSION.ToString();
AdWordsConversionReporter.reportRemarketing(dic);

You can use your tags by opening adwords, Shared library from the leftside, then Audiences from the left side. For more information please check this link.

This Post Has 5 Comments

  1. Hi Stranger Games,
    I had recently purchased your plugin, I am rather new to Xcode and recently used your plugin.
    I am currently having linker error issue after adding ‘-ObjC’ into my other linker flags. After I removed it and adding the Adsupport.framework under Link Binary With Libraries, my build is succeeded, however I am unsure whether if my app will be approved as I have not yet implement ads feature in my game. May I know the usage of that linker flag and the exact way to add it in. I will also like to know by not adding the linker flag my adwords tracking will work or not ( I have no access to the adwords account).

    Thank you very much 🙂

    1. I am not sure if Apple would approve the app or not. For the linker flag, I think if you compiled successfully without it, then something may be wrong with your setup. Please e-mail our support from the about page for further support.

  2. Hello! I have an issue with the plugin; I imported the package to my Unity 5.3.4 project, called the Init () function, and then built an xcode project. I added -ObjC as a linker flag and even added the Adsupport.framework. But when I try to build to my device, I get linker errors:

    Undefined symbols for architecture armv7:
    “_OBJC_CLASS_$_ACTConversionReporter”, referenced from:
    objc-class-ref in AdwordsConversionTracking.o
    “_OBJC_CLASS_$_ACTRemarketingReporter”, referenced from:
    objc-class-ref in AdwordsConversionTracking.o
    “_OBJC_CLASS_$_ACTAutomatedUsageTracker”, referenced from:
    objc-class-ref in AdwordsConversionTracking.o
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Do you have any solution for this? I have tried to build both with and without stripping engine code from within my Unity project.

    Thanks in advance!

    Best regards, Niklas

Leave a Reply to Ze Ren Cancel comment reply

Your email address will not be published. Required fields are marked *