如何谷歌标签管理器+火力地堡集成在科尔多瓦的应用程序?

问题描述 投票:3回答:2

我想谷歌的标签管理器集成到我的科尔多瓦基于项目。整合火力点很容易,因为有可用的插件,管理火力https://github.com/arnesson/cordova-plugin-firebase

所有的谷歌导游都是为了本机应用程序,而不是用于混合应用,在混合应用集成标签经理似乎没有很好的答案的问题,到目前为止,因为如果你试图把应用作为一个web视图将最有时代给你的错误。

如何谷歌代码管理工具在混合应用进行集成,有什么建议?

谢谢。

cordova firebase ionic2 google-tag-manager hybrid-mobile-app
2个回答
2
投票

其实你的插件不支持谷歌标签管理器,但仅适用于Android现在。它是不是“正式”的插件支持,据我所知。

Here is the google-tag-manager sdk for android in your plugin

安装有Android的容器(重要)您的谷歌标签管理器,然后下载您的JSON文件和资源文件的路径添加到您的config.xml。

<platform name="android">
        <content src="index.html" />
        <resource-file src="resources/android/containers/GTM-5MFXXXX.json" target="assets/containers/GTM-5MFXXXX.json" />

here is the documentation of it ..是啊,我知道有没有更多的

请与科尔多瓦构建应用程序,如果JSON文件是正确的文件夹后。

根 - SRC - node_modules - 平台 ----安卓 ------资产 -------- IMG --------容器 ----------> gtm.json ----等

如果你想确保你的谷歌标签管理工作,开始在Android Studio调试器,并与logcat的检查日志。

你应该看到这样的事情。

16:01:03.742 9748-9776/XXX I/GoogleTagManager: Loading container GTM-XXXXXX
16:01:03.750 9748-9776/XXX I/GoogleTagManager: Installing Tag Manager event handler.
16:01:03.757 9748-9776/XXX I/GoogleTagManager: Tag Manager event handler installed.
16:01:03.757 9748-9776/XXX I/GoogleTagManager: Tag Manager initilization took 28ms
16:01:05.502 9748-9882/XXX I/GoogleTagManager: Obtained fresh AdvertisingId info from GmsCore.

你的火力SDK不休息!这应该让整个事情的运行


0
投票

最后得到了这个工作我自己。我最初尝试使用cordova-plugin-firebase其支持Android GTM外的开箱,但需要一个额外的POD /框架的iOS以复加。我永远无法得到额外荚或框架构建与插件。

所以我切换到使用cordova-plugin-firebase-analytics的分支版本已经采用吊舱其所有火力地堡的依赖。退房的插件GTM分支的GitHub的页面上,并期待在提交历史看需要您的前叉做哪些改变。

https://github.com/chemerisuk/cordova-plugin-firebase-analytics/tree/gtm

而得益于埃内斯YALÇIN对方回答您的帮助。

© www.soinside.com 2019 - 2024. All rights reserved.