コードワで開発したアプリのインストール元をトラッキングしたいと思います。コードのこの部分があるdeviceReady
コールバックでこのプラグインhttps://github.com/danwilson/google-analytics-plugin/Google for cordova
を用い
イム:
window.ga.startTrackerWithId('UA-xxxxxxxx-y', 30)
.then(function(){
console.log('Google analytics is ready now');
//the component is ready and you can call any method here
GoogleAnalytics.debugMode();
GoogleAnalytics.setAllowIDFACollection(true);
})
.catch(e => console.log('Error starting GoogleAnalytics', e));
はここでもは、AndroidManifest.xml
でapplication
タグの内容である:
<receiver android:name="cordova.plugins.Diagnostic$LocationProviderChangedReceiver">
<intent-filter>
<action android:name="android.location.PROVIDERS_CHANGED" />
</intent-filter>
</receiver>
<receiver android:enabled="true" android:exported="true" android:name="com.google.android.gms.analytics.CampaignTrackingReceiver">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.CampaignTrackingService" />
<receiver android:enabled="true" android:name="com.google.android.gms.analytics.AnalyticsReceiver">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.AnalyticsService" />
googleのガイドに従って、このlinkを使ってテストしたところ、Broadcast completed: result=0
なので、すべてがOKであるはずです。
この「SO post」には、「作成者が文書化されていない機能をキャンペーンに追加していますが、変更なしで動作します」というタグがマニフェストに追加され、キャンペーンリンクがGoogle Playに送信されたときに機能します。すべてが自動的に行われることを意味しますが、そうではありません!
このプロセスで何か不足していますか、またはdeviceReady
コールバックにURLを取得して、ちょうどwindow.ga.trackView('Screen Title', 'my-scheme://content/1111?utm_source=google&utm_campaign=my-campaign')
のようなものを使用していますか?
ありがとうございます。