Comments (18)
Hi - Thanks for the plugin. Am trying it on the iOS version of my cordova app. Am receiving a similar error too. I see issues in parsing the json file. Here are my logs. Am struck with this. Can someone help me plz.
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 dont 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 Version 2. It was an option in the old gtm product. Version 2 only has export.
But 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 I tried with version 3.15 of the library as well, and still no luck. Having the same issue.
Thanks. Pls let me know if you need more information.
from cordova-plugin-tag-manager.
+1
from cordova-plugin-tag-manager.
Same problem here.
At first I thought there was some misconfiguration in my google tag manager account, but now I believe that this cordova plugin simply does not work.
I monitored the outgoing connections from my phone (using a proxy) and I did not see anything related to googletagmanager.com...
adb logcat
shows things, but I dont understand what it means:
06-27 09:48:17.048 21911 21977 W GoogleTagManager: No asset file: tagmanager/GTM-XXX found.
06-27 09:48:17.049 21911 21977 W GoogleTagManager: No asset file: tagmanager/GTM-XXX.json found (or errors reading it).
06-27 09:48:17.049 21911 21977 W GoogleTagManager: No default container found; creating an empty container.
06-27 09:48:17.084 21911 21977 W PluginManager: THREAD WARNING: exec() call to TagManager.initGTM blocked the main thread for 51ms. Plugin should use CordovaInterface.getThreadPool().
06-27 09:48:17.097 21911 21911 I chromium: [INFO:CONSOLE(278)] "initGTM - id = GTM-XXX; interval = 5 seconds", source: file:///android_asset/www/js/controllers.js (278)
06-27 09:48:18.045 21911 21911 I chromium: [INFO:CONSOLE(285)] "trackPage - url = /application/events", source: file:///android_asset/www/js/controllers.js (285)
06-27 09:48:19.034 21911 21911 I chromium: [INFO:CONSOLE(290)] "dispatch sent", source: file:///android_asset/www/js/controllers.js (290)
EDIT: it works for me... but I dont really know what has changed.
from cordova-plugin-tag-manager.
I also managed to make it work. I've created a fork with v4-updated code here:
https://github.com/kozmanbalint/cordova-plugin-tag-manager
from cordova-plugin-tag-manager.
@kozmanbalint I am neither familiar with GTM, nor with cordova plugins development... what are the differences brought by your fork? Does it still require to follow the setup steps listed in https://github.com/kraihn/cordova-plugin-tag-manager/wiki/GTM-Setup?
from cordova-plugin-tag-manager.
Basically the code is updated to use gtm api v4, and it adds some debug logging.
You have to follow the steps listed in the wiki, as that will enable the tag manager to pass events and visits to Analytics (or AdWords, etc). Once you're done with that, you'll have to download the container binary from your tagmanager account to your app's res/raw folder and rename it after your container id, lowercase (so if your container id is "GTM-X1234Y" then rename your container binary file to "gtm_x1234y".
from cordova-plugin-tag-manager.
@kozmanbalint i downloaded your updated version but my tagmanager account only allow me to download the json file of my container. Any idea how can i make it work?
from cordova-plugin-tag-manager.
Downloading container binary is actually not that obvious, I agree. Navigate to "Versions" in the Tag manager menu. You'll find the "download" option in the dropdown list on the right.
from cordova-plugin-tag-manager.
@kozmanbalint - I downloaded the json file from GTM account - Admin, export for the live version. I dont 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 Version 2. It was an option in the old gtm product. Version 2 only has export.
Is there anyway to recreate this manually? What does this file contain?
Tried with version 3.15 of the library as well, and still no luck. Having the same issue.
from cordova-plugin-tag-manager.
@iosnewbie2016 I'm having the same issue. Any luck finding a solution?
from cordova-plugin-tag-manager.
@matt-west - Nope. We are still working on the issue. The plugin does not work with latest version of GTM.
from cordova-plugin-tag-manager.
Thanks for the update @iosnewbie2016
from cordova-plugin-tag-manager.
Hey guys, I'm receiving hits to GA both from Android and iOS devices using the current revision of this repo. In case it helps anyone, I have created (in the GTM dashboard) two different accounts: one iOS legacy account and one Android legacy account.
Then I configured both separated containers as instructed in https://github.com/kraihn/cordova-plugin-tag-manager/wiki/GTM-Setup.
The binaries are not necessary in order to make the plugin hit GA according to my tests, but in case you want to avoid the app warnings concerning the binaries you could download the binaries and place them, with their original filenames, in the following paths:
Android -> platforms/android/assets/tagmanager/GTM-XXXXX1
iOS -> platforms/ios/{appName}/Resources/GTM-XXXXX2
from cordova-plugin-tag-manager.
@bitumin Can you please guide me, how did you get this tracked? Well, I am not able to see any events in GA. I've followed the Wiki perfectly and indeed, I have i've included User ID as well in "Fields to Set" in GTM. I couldn't track the events.
The only thing i am able to see is the real time traffic but not events neither the User ID report.
Pls help !!
from cordova-plugin-tag-manager.
@sunayanagoyale At the end I decided to just send the events manually from my mobile app... This is the key part of the code I used in order to do that... https://pastebin.com/bQ3DNR4x
from cordova-plugin-tag-manager.
Thanks a lot, @bitumin
Manually, ok! Where did you change this part of the code? Which file, any clue please?
I have a query - how do i track User ID using tagmanager.pushevent method? The set up in GTM and GA looks to be fine. I have used &uid as field name in GTM while configuring Tags. However, not sure what is hindering to see the data in GA for user id implementation. Can you please suggest?
Let me know if you need any screenshots. Thanks again!
from cordova-plugin-tag-manager.
👍 I haven't been able to set this up either.
from cordova-plugin-tag-manager.
After some debugging I finally found out that the "period" attribute is very much not optional, as the initialization fails when you do not provide it.
from cordova-plugin-tag-manager.
Related Issues (20)
- Error: registry returned 404 for GET on https://registry.npmjs.org/com.jareddickson.cordova.tag-manager HOT 3
- Cannot find plugin.xml HOT 2
- Unable to install plugin HOT 2
- Getting Error on install : Cannot find plugin.xml for plugin "package" HOT 2
- Network Request Whitelist vulnerability? HOT 3
- White list prerequisite needed in GTM plugin doc
- IDFA, AdvertiserID and backend user id reference
- Anyone made this work for Ionic2 by any chance? HOT 6
- Issue with wiki and installation
- Support
- trackEvent and pushEvent?
- Need help
- Cordova GTM plugin?
- datalayer
- Does this works only for GTM logging or for inserting third-party tags with GTM as well?
- How to view data sent to tag manager? HOT 1
- setup for ionic 2
- Error on android build after installing plugin
- Is it possible to send custom dimensions to GA with this plugin?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-tag-manager.