如何在 piwik 中实现 alexa 认证脚本?
how to implement alexa certify script in the piwik?
如何在piwik子域中实现alexa脚本?
这是代码:
<script type=“text/javascript”>
_atrk_opts = {
atrk_acct:“KeWOp1P8cT20VRss”, domain:“example.com”,dynamic: true};
(
function() {
var as = document.createElement(‘script’); as.type = ‘text/javascript’;
as.async = true;
as.src = “https://d31qbv1cthcecs.cloudfront.net/atrk.js“;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(as, s);
}
)();
</script>
<noscript>
<img src=“https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=KeWOp1P8cT20VR” style=“display:none” height=“1” width=“1" alt=“” />
您可以编辑布局文件:
plugins/Morpheus/templates/layout.twig
在 head 标签结束前添加您的认证码
<script type=“text/javascript”>
_atrk_opts = {
atrk_acct:“KeWOp1P8cT20VRss”, domain:“example.com”,dynamic: true};
(
function() {
var as = document.createElement(‘script’); as.type = ‘text/javascript’;
as.async = true;
as.src = “https://d31qbv1cthcecs.cloudfront.net/atrk.js“;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(as, s);
}
)();
</script>
<noscript>
<img src=“https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=KeWOp1P8cT20VR” style=“display:none” height=“1” width=“1" alt=“” />
</noscript>
</head>
如何在piwik子域中实现alexa脚本? 这是代码:
<script type=“text/javascript”>
_atrk_opts = {
atrk_acct:“KeWOp1P8cT20VRss”, domain:“example.com”,dynamic: true};
(
function() {
var as = document.createElement(‘script’); as.type = ‘text/javascript’;
as.async = true;
as.src = “https://d31qbv1cthcecs.cloudfront.net/atrk.js“;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(as, s);
}
)();
</script>
<noscript>
<img src=“https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=KeWOp1P8cT20VR” style=“display:none” height=“1” width=“1" alt=“” />
您可以编辑布局文件:
plugins/Morpheus/templates/layout.twig
在 head 标签结束前添加您的认证码
<script type=“text/javascript”>
_atrk_opts = {
atrk_acct:“KeWOp1P8cT20VRss”, domain:“example.com”,dynamic: true};
(
function() {
var as = document.createElement(‘script’); as.type = ‘text/javascript’;
as.async = true;
as.src = “https://d31qbv1cthcecs.cloudfront.net/atrk.js“;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(as, s);
}
)();
</script>
<noscript>
<img src=“https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=KeWOp1P8cT20VR” style=“display:none” height=“1” width=“1" alt=“” />
</noscript>
</head>