reywood/meteor-iron-router-ga not working with mobile app cordova for Google Analytics

空扰寡人 提交于 2019-12-05 07:52:56

问题


I am using reywood/meteor-iron-router-ga package for my Google analytics but i do not know why events or Real time events are not logged from mobile app. I did simple configurations for this but not worked. I also used Google Analytics debugger to detect the problem but it looks fine

  • Link Analytics and Search Console -> RESOLVED
  • Bad Default URL -> RESOLVED

This is the output of any event click on my app. I also try to replace reywood/meteor-iron-router-ga with simple JavaScript Analytics.js but still no benefit.

ga('send', 'event', {
            eventCategory: Category,
            eventAction: Action,
            eventLabel: Label
        });

settings.json

"ga": {
        "id": "UA-75464623-1",
        "create": {
            "cookieDomain": "dev.goodatlas.com",
            "cookieName": "my_ga_cookie",
            "cookieExpires": 3600
        }
    }

Cordova Settings for mobile in mobile-config.js

App.accessRule('*.google-analytics.com/*');

Even on Google Tag Assistant it shows me the data but no display on Google Analytics Real Time or on event Behavior
Can any body tell me what i am doing wrong here.....

I already spent too much time on this


回答1:


I am also having the same issue. When I run the app I can see the realtime tracking, but when I build the app and then run it doesn't work.

As per the package we need to provide public settings of Google Analytics in settings.json file. I've solved it by passing the --mobile-settings settings.json while building the app and it works.



来源:https://stackoverflow.com/questions/36980461/reywood-meteor-iron-router-ga-not-working-with-mobile-app-cordova-for-google-ana

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!