Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 如何在不安装第三方库的情况下在react应用程序中添加谷歌分析?可能吗?_Reactjs - Fatal编程技术网

Reactjs 如何在不安装第三方库的情况下在react应用程序中添加谷歌分析?可能吗?

Reactjs 如何在不安装第三方库的情况下在react应用程序中添加谷歌分析?可能吗?,reactjs,Reactjs,我正在尝试将google analytics给我的代码添加到index.html中的React应用程序中。有可能吗?或者可以做些什么?是的,我会在索引文件中添加代码片段,但如果你的应用程序是单页应用程序,你需要使用javascript跟踪客户端路由的更改:我查看了它,但不幸的是没有解决我的问题

我正在尝试将google analytics给我的代码添加到index.html中的React应用程序中。有可能吗?或者可以做些什么?

是的,我会在索引文件中添加代码片段,但如果你的应用程序是单页应用程序,你需要使用javascript跟踪客户端路由的更改:我查看了它,但不幸的是没有解决我的问题