2
我正在使用反應頭盔來推動頭部元素。需要使用的代碼片段是GTM和電子商務跟蹤。但是,無論如何,我無法找到一種在頭部插入腳本的方法。該文檔顯示從外部源加載。代碼片段具有正在使用的動態值。如何在react-helmet中添加javascript代碼片段?
的文檔是從t這網址: react-helmet
<Helmet script={[
{src: "http://include.com/pathtojs.js", type: "text/javascript"},
{type: "application/ld+json", innerHTML: `{ "@context": "http://schema.org" }`}
]}
/>