ラベル Google Analytics の投稿を表示しています。 すべての投稿を表示
ラベル Google Analytics の投稿を表示しています。 すべての投稿を表示

2014年3月1日土曜日

IDFA(advertisingIdentifier)「PLA 3.3.12」リジェクトとの闘いの軌跡

IDFA(advertisingIdentifier)「PLA 3.3.12」リジェクトとの闘いの軌跡


二度リジェクトされた私はこうして審査を通過しました



今、iOSアプリ開発者の間で最もホットな話題かもしれないIDFAリジェクト問題。
私もそれで二度リジェクトされましたが、つい先日何とか審査を通過しました。
そこで、他の開発者たちの参考になればとどのような経過を辿ったのかをまとめます。


事の起こり


リジェクト

2014/2/11にアプリの申請を行い、2/19に「In Review」となったのですが審査の結果「App Submission Feedback」、以下の理由でリジェクトされたのです。


Resolution Centerからのメッセージ

==============================================================

Reasons

Program License Agreement


PLA 3.3.12

We found your app uses the iOS Advertising Identifier but does not include ad functionality. This does not comply with the terms of the iOS Developer Program License Agreement, as required by the App Store Review Guidelines.

Specifically, section 3.3.12 of the iOS Developer Program License Agreement states:

"You and Your Applications (and any third party with whom you have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier."

Note: iAd does not use the AdSupport framework, ASIdentifierManager, or the Advertising Identifier. Therefore they are not required for iAd implementations and should not be included in your app for iAd support. 

Please check your code - including any third-party libraries - to remove any instances of:

class: ASIdentifierManager
selector: advertisingIdentifier
framework: AdSupport.framework

If you are planning to incorporate ads in a future version, please remove the Advertising Identifier from your app until you have included ad functionality.

To help locate the Advertising Identifier, use the “nm” tool. For information on the “nm” tool, open a terminal window and enter, “man nm.” 

If you do not have access to the libraries' source, you may be able to search the compiled binary using the "strings" or "otool" command line tools. The "strings" tool lists the methods that the library calls, and "otool -ov" will list the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides.

==============================================================
私はここで初めて「PLA 3.3.12」「advertisingIdentifier」というキーワードを眼にしたのです。


一度目のリジェクト対策

調べてみると「advertisingIdentifier」いわゆるIDFAという広告識別子を広告以外の用途で使用してはならないとのこと。
2014年2月から新しくそのような規約「PLA 3.3.12」が追加された為に大量のリジェクトが発生していることが判明しました。

外部ライブラリに問題あり

私のアプリはAdMobメディエーションでNend、AdMob、iAdを切り替えて表示するようにしていますが、その広告以外でIDFAを使っている覚えがありませんでした。
よくよく調べてみると外部のライブラリで使用している場合があり、私の場合はアクセス解析の「Google Analytics」で使用されていることが分かりました。
他にも効果測定計のモノやあんまり関係無さそうな「Unity」も引っかかるらしいです。

Google Analytics SDKの更新

私が使用していたのはv3(Beta)版で、ビルドするのに「AdSupport.framework」が必要でした。
この「AdSupport.framework」を広告用途以外で使用すると審査に引っかかる模様。
最新のv3.03aでは不要となっていたので、それに更新して2/19に再申請しました。



二度目のリジェクト

2/26にようやく「In Review」となったのですが、またも「App Submission Feedback」、リジェクト理由は以下でした。

Resolution Centerからのメッセージ(二度目)

==============================================================

Reasons

Program License Agreement
Thank you for contacting us.

We have verified that your app contains code that is accessing the Advertising Identifier, however, we did not see ads served in your app. As stated in section 3.3.12 of the iOS Developer Program License Agreement, an app must serve ads in order to use the Advertising Identifier:

“You and Your Applications (and any third party with whom you have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier.” 

We have seen this behavior in apps that include third-party libraries. These libraries are often analytics engines, ad engines, or other types of third-party services.

We require that you locate and remove this code prior to resubmitting, and recommend that you use the "nm" tool or the command line tools "strings" or "otool -ov" to find the following entities:

- class: ASIdentifierManager
- selector: advertisingIdentifier
- framework: AdSupport.framework

If you are unable to locate these entities, you may wish to work with an Apple Developer Technical Support engineer. 

If you believe your app is serving ads, please:

- ensure that you have tested your app on a device, not just the simulator, and that you have removed previous versions of your app prior to testing

- provide us the steps to locate ads in your app

==============================================================
前回と同じやんけ!



二度目のリジェクト対策


Resolution Centerに返答

広告を掲載しているので「AdSupport.framework」を使用していますが、問題ないはずです。
色々と調べている内にAppleは広告に使っていても「AdSupport.framework」を使っているアプリを闇雲にリジェクトしているという噂があり、どうやら私もそれをやられたようです。
私は怒りを抑えつつ、以下の文面でResolution Centerに返答しました。

返答内容

==================================
I have to display the ad.
So, I'm using "AdSupport.framework".
Are there any problems?
==================================
(広告を表示しています。)
(ですから、”AdSupport.framework”を使用しています。)
(何か問題ありますか?)
上記の意味で翻訳サイトを使った拙い英語で返答しました。
これについての返信は次の日2/27に来ました。


Resolution Centerからの回答

==============================================================

Program License Agreement

Thank you for your response.
However, as stated previously, the app should contain non iAds.
Please let us know if you have any other questions and thank you for your cooperation.

==============================================================
えーと、いいからiAdを消せってことでしょうか?
このメッセージを見た私は「どうせいっちゅうねん」と途方にくれました。


Resolution Centerに返答(二度目)

この後、色々と調べたのですがやはり問題ないはずです。
人によっては広告を表示したスクリーンショットの提出を求められたり、「再申請してくれ」といったら通ったという情報があったので、それらを盛り込んで再度2/27にResolution Centerへメッセージを投げました。
==============================================================
Please look at the screen shot.
I have display ads definitely like this.
Please try the examination again.

スクリーンショットを見てください。
このように間違いなく広告を表示しています。
もう一度審査をやり直してください。


==============================================================
  • 問題ないという証拠としてのスクリーンショットの提示
  • 「再審査をしてくれ」というはっきりとした要求
  • 英語ではニュアンスが違うかも知れないので日本語も併記
一度目を踏まえて上記を盛り込んだメッセージを送りました。
返答はまたしても翌日の2/28、この辺りの非効率さ加減もイライラします。


審査通過

2/28未明にResolution Centerから返答があったようですが、内容は確認できませんでした。
なぜなら、そのあと直ぐにステータスが「In Review」となり速攻で審査を通過していて、朝確認したときには「Ready for Sale」となっていました。
そのときにはもうResolution Centerとのやり取りが見られなくなっていました。
審査は通過したのですが、なんだかモヤモヤが残るあっけない幕切れでした。



闘いを終えて

二度目のリジェクトを食らったときはさすがに参りましたが、ネットに情報を公開している方々のおかげで何とか乗り越えることができました。
なので、今回の私の出来事をここに記すことによって誰かのお役に立てれば幸いです。



二度のIDFAリジェクトを乗り越えたアプリ

ということで3/1に無事アプリをリリースしました。
タップで計算式を作って暗算する知育系アプリです。
あなたの脳偏差値はいくつかな?




2014年2月28日金曜日

iOSアプリをGoogle Analyticsでアクセス解析するとこんな感じ

Google Analytics for iOS

アクセス解析するとこんな感じ

前回の続きで実際にどのように解析できるかご紹介します。


リアルタイム

サマリー

リアルタイムでのアクセス状況が確認できます。
自分のアプリで今何人遊んでいるか分かるので眺めているだけでニヤニヤできます。



ユーザー

サマリー

日毎のアクティブユーザー数や新規、リピートの割合、平均セッション時間なども取れます。
この例だと「リピーターばかりで、新規ユーザーが少ないなあ」などと分析できます。


iOSのサマリー

iOSのバージョンや端末毎の割合、画面の解像度などが分かります。
これを見るとかなりの割合がiOS7ユーザーであることが解析できます。


行動

サマリー

スクリーンビュー数やイベント数などがここで参照できます。
前回、トラッキングを実装したページやイベントがここに反映されるわけです。


イベントアクション毎のサマリー

イベントは、カテゴリ、アクション、ラベルを設定するのでそのセクションごとにサマリーが見られます。
私のアプリは英単語を答えるので、カテゴリに「回答」、アクションに「正解」「不正解」、ラベルに「実際に回答した単語」を設定してどのような単語が多く回答されたのかを解析しています。

イベントは上手に設定すれば、アプリの改善に役に立ちます。
例えばステージクリアー制のゲームでステージ別クリアーした回数をトラッキングすると、「ステージ4は50回クリアーされているのに、次のステージ5は3回しかクリアーされていない」という事実が判明し、ステージ5の難易度を下げたほうが良いことが分かります。


おわりに

以上、さらっとではありますがGoogle Analyticsでアクセス解析をして取れるデータの例をご紹介しました。
私自身も正直使いこなせているとは言えず、もっと高度な解析ができるはずです。
ですが、簡単なトラッキングをするだけでもこれだけの数字が取れるのでとりあえず入れてみるのをオススメします。

2014年2月27日木曜日

iOSアプリをGoogle Analyticsでアクセス解析する方法

Google Analytics for iOS

iOSアプリをGoogle Analyticsでアクセス解析する方法

iOSアプリにGoogle Analyticsを組み込むとアクセス解析ができます。
実は結構簡単にできるので、今回はそのやり方をご紹介します。
※2014/2/27時点 ver3.03c

Google Analyticsアカウントの作成


サイトにアクセス

http://www.google.co.jp/analytics/


アカウントを作成

『アカウントを作成』ボタンをクリック


Google アナリティクスの使用を開始

『お申し込み』ボタンをクリック


新しいアカウント

トラッキングの対象『モバイルアプリ』

アカウント名『iOSアプリ』
(いくつかのアプリをまとめるカテゴリ名のようなもの)

アプリ名『テストiOSアプリ』

業種『インターネット、通信事業』
(該当のものを適当に選択)

レポートのタイムゾーン『日本』 (GMT++09:00)東京

データ共有設定『全てのチェックをはずす』
(オプション項目なので用途に合わせて適当に選択)

※ここはご自分で適切なモノに変えてください。



トラッキングIDを取得

『トラッキングIDを取得』ボタンをクリック



Googleアナリティクス利用規約

『同意する』ボタンをクリック



トラッキングID、SDK取得

トラッキング IDをメモ
【UA-48******-1】<注意>*は数字です

Google Analytics iOS SDK『ダウンロード』
→【GoogleAnalyticsServicesiOS.zip】を取得





Google Analytics iOS SDKの組み込み


ファイルの追加

ダウンロードしたSDKから以下のファイルをプロジェクトに追加

  • GAI.h
  • GAITracker.h
  • GAITrackedViewController.h
  • GAIDictionaryBuilder.h
  • GAIFields.h
  • GAILogger.h
  • libGoogleAnalyticsServices.a


フレームワークの追加

「Linked Frameworks and Libraries」の「+」ボタンで追加

以下のフレームワークを追加
  • libGoogleAnalyticsServices.a
  • CoreData.framework
  • SystemConfiguration.framework
  • libz.dylib




トラッキングの実装


サンプルとして「Single View Application」へ実装します


トラッキング開始


  • AppDelegate.m
======================================================
#import "GAI.h"

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    
    // Initialize tracker.
    [[GAI sharedInstance] trackerWithTrackingId:@"UA-48******-1"];
    
    return YES;
}
======================================================

ページをトラッキング(自動計測)


  • ViewController.h
======================================================
#import "GAITrackedViewController.h"

@interface ViewController : GAITrackedViewController

@end
======================================================



  • ViewController.m
======================================================
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    // Automatic Screen Tracking
    self.screenName = @"Test view 01";
    
}
======================================================



ページをトラッキング(手動)


  • ViewController.m
======================================================
ViewController.m

#import "GAI.h"
#import "GAIFields.h"
#import "GAIDictionaryBuilder.h"


- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    // Manual Screen Tracking
    id tracker = [[GAI sharedInstance] defaultTracker];
    
    // Set the screen name on the tracker
    // so that it is used in all hits sent from this screen.
    [tracker set:kGAIScreenName value:@"Test view 02"];
    
    // Send a screenview.
    [tracker send:[[GAIDictionaryBuilder createAppView]  build]];
    
}
======================================================



イベントをトラッキング


  • ViewController.m
======================================================
#import "GAI.h"
#import "GAIDictionaryBuilder.h"

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    //Events  Tracking
    id tracker = [[GAI sharedInstance] defaultTracker];
    
    [tracker send:[[GAIDictionaryBuilder
      createEventWithCategory:@"ui_action"    // Event category (required)
                       action:@"button_press" // Event action (required)
                        label:@"play"         // Event label
                        value:nil] build]];   // Event value
}
======================================================



動作確認

Google Analyticsでトラッキングを確認できればOK


実装の詳細

他にも機能はあるので、実装の詳細については以下を参照




アクセス解析

次回、トラックしたページ、イベントがどのように解析できるのか掲載します。
掲載しました。