react-gtm-moudle似乎创建了错误的scr路径。它正在将"/“替换为".”。
下面的src路径是由Google提供的。https://www.googletagmanager.com/gtag/js
下面的src路径由react-gtm-module gtag:https://www.googletagmanager.com/gtm.js生成
Google标签管理器标记了此错误。script async="“src=""/script">https://www.googletagmanager.com/gtm.js?id=AW-xxx871634>m_auth=>m_preview=>m_cookies_win=x"">/script
Invalid or missing account ID?
HTTP response code indicates tag failed to fire: Status 404. This could be due to an empty or un-published container.我想我正确地初始化了react-gtm-module:
import GTagManager from 'react-gtm-module';
GTagManager.initialize({gtmId: 'AW-xxx871634'});
class App extends React.Component {任何帮助都将不胜感激。谢谢。
发布于 2020-09-04 00:57:47
已解决。
Google Tag Manager (GTM)有两种提供跟踪转换信息的方法。一种方法是将转换ID发送到GTM。另一种方法是发送容器ID GTM。
react-gtm-module通过提供容器ID和转换ID来工作。我的错误是使用转换ID进行初始化。使用容器ID可以正常工作。
https://stackoverflow.com/questions/63679328
复制相似问题