GA 更新

This commit is contained in:
ciaochaos 2020-07-02 13:55:35 +08:00
parent e5aae8511c
commit 9c5138d596
2 changed files with 10 additions and 15 deletions

View File

@ -2,7 +2,16 @@
<html lang="zh">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-165845289-1"></script>
<script data-ad-client="ca-pub-3611009408282658" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-165845289-1');
gtag('config', 'G-3NKS6ZG27V');
</script>
<script>
(function(){
var bp = document.createElement('script');

View File

@ -13,21 +13,7 @@ import {loadDownloadData} from "../../actions";
import ReactGA from 'react-ga';
import {setScrollbarWidthProp} from "../../utils/util"
ReactGA.initialize(
[
{
trackingId: 'UA-165845289-1',
gaOptions: {
name: 'trackerUA',
}
},
{
trackingId: 'G-3NKS6ZG27V',
gaOptions: { name: 'trackerG' }
}
],
{ debug: true, alwaysSendToDefaultTracker: false }
);
ReactGA.initialize(['UA-165845289-1','G-3NKS6ZG27V']);
function App({ dispatch }) {
const updateDownloadData = useCallback((downloadData) => dispatch(loadDownloadData(downloadData)), []);
setScrollbarWidthProp()