android - Google campaign for cordova -


i want track installation source of app developed using cordova.

im using plugin https://github.com/danwilson/google-analytics-plugin/

in deviceready callback there piece of code:

 window.ga.starttrackerwithid('ua-xxxxxxxx-y', 30)                   .then(function(){                       console.log('google analytics ready now');                       //the component ready , can call method here                       googleanalytics.debugmode();                       googleanalytics.setallowidfacollection(true);                   })                 .catch(e => console.log('error starting googleanalytics', e)); 

also in here application tag content in androidmanifest.xml :

<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" /> 

after following google guide , testing using link broadcast completed: result=0, supposed ok.

also in so post said "the author added undocumented functionality campaigns, , works without modification. add tags in manifest , works when campaign link launched google play." means done automatically, not !

am missing in process, or there way url in deviceready callback , use window.ga.trackview('screen title', 'my-scheme://content/1111?utm_source=google&utm_campaign=my-campaign') ???

thank you.

i found it,

the whole plugin working fine, make google campaign work needed install "google play services sdk" on building machine. rest done under hood.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -