Search Unity

Client Side Install Tracking

Discussion in 'Unity Ads & User Acquisition' started by chazzysb, May 4, 2016.

  1. chazzysb

    chazzysb

    Joined:
    Jan 8, 2015
    Posts:
    6
    Hi,

    Using Unity 5.1.4f1, Xcode 6.4
    I already have UnityAds in my game and now want to start my own CPI campaign.

    Im trying to implement client side install tracking as detailed here:
    https://unityads.unity3d.com/help/advertising/sdk-install-tracking

    My Xcode project already has: UnityAds.framework, UnityAds.bundle, StoreKit.framework, AdSupport.framework

    As detailed in the link above, I added #import <UnityAds/UnityAds.h> to UnityAppController.h

    And then in didFinishLaunchingWithOptions in UnityAppController.mm if I add the following line as detailed in the link it complains about the unknown myViewController:
    (I've replaced my gameid with *****)
    [[UnityAds sharedInstance] startWithGameId: @"*****" andViewController:myViewController];

    If I fix it with the suggestion UIViewController it complains that UIViewController is an unexpected interface.

    I then changed it to
    [[UnityAds sharedInstance] startWithGameId: @"*****" andViewController:UnityGetGLViewController()];

    Then it compiles and runs fine but no adds appear in the game at all!

    Can anyone point me in the right direction here? My game already has UnityAds working, I'm avoiding server to server install tracking for the time being, I simply want to notify Unity Ads of installs for the CPI campaign.

    Whats more confusing is that as the game already displays UnityAds, the call to [UnityAds sharedInstance] startWithGameId:gameid andViewController:UnityGetGLViewController()];
    is already made in UnityAdsUnityWrapper.mm


    Thanks,
    Chas


     
    Last edited: May 4, 2016
  2. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    If you are using the same game ID for both monetization and advertising, you should already be set. All you need to do is initialize the Unity Ads SDK to do the client side install tracking. If you were able to see ads before, I'd recommend changing it back to the way you had it.

    You should be good to go at that point.
     
    Treegemmer likes this.