Issues in Google Tag Manager plugin in Cordova

╄→尐↘猪︶ㄣ 提交于 2019-12-06 08:49:25

问题


Am trying to use GTM plugin for Cordova - https://github.com/kraihn/cordova-plugin-tag-manager. Am facing issues on the iOS version of my cordova app.

I get warnings that the binary resource file and plist file are not found.

GoogleTagManager warning: Cannot find binary resource file 'GTM-XXXXXX'.
GoogleTagManager warning: Cannot find resource file 'GTM-XXXXXX.plist'
GoogleTagManager verbose: loading default container from GTM-XXXXXX.json

I downloaded the json file from GTM account - Admin, export for the live version. I don't see an option for download from Actions tab(as listed in some of the posts) and when I checked with my GTM anchor, she informed that, it is no longer available with latest Version. It was an option in the old gtm product. Newer Version only has export option.

And with the json, I get error on parsing it.

GoogleTagManager warning: Error reading resource from json file: Type __NSCFArray is not supported
GoogleTagManager error: No default container found; creating an empty container.

GoogleTagManager verbose: GoogleAnalytics 3.13 -[GAIRequestBuilder requestGetUrl:payload:] (GAIRequestBuilder.m:195): building URLRequest for https://ssl.google-analytics.com/collect
GoogleTagManager info: GoogleAnalytics 3.13 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status -1

I saw one of the solutions to bump up library version and but I still run into the same problem even after bumping up version of libGoogleAnalyticsServices.a to 3.15.

Is there a way to get the plugin working for the latest version of GTM? Is there a way to recreate the binary container & plist in a manual way?

Can you pls help me with this? Pls let me know if you need more information.


回答1:


  1. Go to GTM Account
  2. Open Versions tab.
  3. Click to export button instead of download button.
  4. Import this to your iOS/Android Project.


来源:https://stackoverflow.com/questions/38437505/issues-in-google-tag-manager-plugin-in-cordova

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