google-analytics-plugin
google-analytics-plugin copied to clipboard
Cannot Get Install Referrer
This issue has been posted multiple times, but still no fix can be found. The requirement is to get the campaign name of where the app was installed from. Even though the SDK reports it rightly to the google analytic servers, we cannot access it in any way from javascript. Similar issue : https://github.com/danwilson/google-analytics-plugin/issues/431
How do i emulate the INSTALL_REFERRER
adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n com.XX.XX/com.google.android.gms.analytics.CampaignTrackingReceiver --es "referrer" "utm_source=testSource&utm_medium=testMedium&utm_term=testTerm&utm_content=testContent&utm_campaign=testCampaign1"AnalyticsReceiver
What do I do in js
window.ga.getVar('&cn', function(result){ console.log(result);})
VM201:1 null
undefined
Some noticeable debug messages
10-02 14:48:16.791 30536 30554 W GAv4 : AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See http://goo.gl/8Rd3yj for instructions.
10-02 14:48:16.794 30536 30554 W GAv4 : CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See http://goo.gl/8Rd3yj for instructions.
10-02 14:48:16.797 30536 30554 W GAv4 : AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See http://goo.gl/8Rd3yj for instructions.
CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See http://goo.gl/8Rd3yj for instructions.
Hit sent to the device AnalyticsService for delivery
10-02 14:47:49.626 30148 30294 E GAv4 : Ignoring multiple install campaigns. original, new: utm_source=google-play&utm_medium=organic, utm_source=testSource
I am using the latest plugin 1.8.3, testing on android 7.1
No I am taking about android here
On Mon, 2 Oct 2017 at 9:05 PM, victor sosa [email protected] wrote:
@snowbreeze https://github.com/snowbreeze are you using the browser API?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/danwilson/google-analytics-plugin/issues/472#issuecomment-333572205, or mute the thread https://github.com/notifications/unsubscribe-auth/AIfIocOCo3r4Vq9lCSJ4rvrQk6VLCJPGks5soQLIgaJpZM4PqZfO .
could you try to get this var 'utm_campaign'?
I tried. It didnt work. Returning null.
On Mon, 2 Oct 2017 at 9:12 PM, victor sosa [email protected] wrote:
could you try to get this var 'utm_campaign'?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/danwilson/google-analytics-plugin/issues/472#issuecomment-333574308, or mute the thread https://github.com/notifications/unsubscribe-auth/AIfIoblVO87zK7eaomZgS8GmYhwetYSVks5soQRvgaJpZM4PqZfO .
I don't have a idea of why is not working; Checking the docs https://developers.google.com/analytics/devguides/collection/android/v4/dispatch#background I can see that the only different with the campaing and Analytics config is that the WAKE_LOCK permissions is missing; but until now everything has been working, this could be the issue but I am not sure. This is a guess.
please refers to issue #468
Are you sure that google analytics stores this key for retrieval? @victorsosa
What version of android are you using? I have noticed some issues that seem related to this with Android 8.
I have tried on all versions. This doesnt work.
Hi all,
any solution to this?
please test this again on version 1.8.5, the getVar method was changed for the browser platform
FWIW, it doesn't seem that tracker.setCampaignParamsOnNextHit()
is being fired anywhere (or the if
s in the Tracker class are preventing it), so none of the campaign vars appear to be available. I was able to get it "working" by setting it manually with the values stored in com.google.android.gms.analytics.prefs
SharedPreferences on load.