我在我的 React 应用程序上使用 google adsense,我实现了广告单元组件的代码,如下所示:
export const SideAdPlaceholder = () => {
(window.adsbygoogle = window.adsbygoogle || []).push({});
return (
<div
className="adSides"
>
<ins
className="adsbygoogle"
style={{ display: "block" }}
data-ad-client="ca-<adsense account>"
data-ad-slot="32777475897"
data-ad-format="auto"
data-full-width-responsive="true"
></ins>
</div>
);
};
Run Code Online (Sandbox Code Playgroud)
并添加到index.html<script type="text/plain" data-cookiescript="accepted" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-<adsense account>" crossorigin="anonymous"></script> 文件的正文中。但我收到以下错误
谁能告诉我如何解决这个错误