Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
c877d2c388ff52dc621571ce54b25cfd61386aa8
1 parent
160bcb90
add web analysis code.Review by:@liangzhifeng
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
0 deletions
template/www.yohobuy.com/partials/layout/analysis.phtml
template/www.yohobuy.com/partials/layout/footer.phtml
web-static/js/common.js
template/www.yohobuy.com/partials/layout/analysis.phtml
0 → 100644
View file @
c877d2c
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
var _hmt = _hmt || [];
(function() {
function async_load(){
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W958MG');
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
(function() {
var hm = document.createElement("script");
hm.src = "http://static.yohobuy.com/js/analytics/analysis.js";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
}
window.addEventListener('load', async_load, false);
})();
</script>
<script>
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
<script src="http://static.yohobuy.com/js/v3/o_code.js?v=20150420" async="async"></script>
\ No newline at end of file
...
...
template/www.yohobuy.com/partials/layout/footer.phtml
View file @
c877d2c
...
...
@@ -20,5 +20,6 @@
</script>
{
{/if
}
}
{
{>
layout/use
}
}
{
{>
layout/analysis
}
}
</body>
</html>
\ No newline at end of file
...
...
web-static/js/common.js
View file @
c877d2c
...
...
@@ -94,6 +94,34 @@ function getShoppingKey() {
return
JSON
.
parse
(
c
).
k
;
}
//YAS统计代码
(
function
(
w
,
d
,
s
,
j
,
f
)
{
var
a
=
d
.
createElement
(
s
);
var
m
=
d
.
getElementsByTagName
(
s
)[
0
];
w
.
YohoAcquisitionObject
=
f
;
w
[
f
]
=
function
()
{
w
[
f
].
p
=
arguments
;
};
a
.
async
=
1
;
a
.
src
=
j
;
m
.
parentNode
.
insertBefore
(
a
,
m
);
})(
window
,
document
,
'script'
,
'http://cdn.yoho.cn/yas-jssdk/1.0.13.6.3/yas.js'
,
'_yas'
);
(
function
()
{
var
uid
=
getUid
();
uid
=
uid
===
0
?
''
:
uid
;
window
.
_ozuid
=
uid
;
//暴露ozuid
if
(
window
.
_yas
)
{
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.6.3'
,
'yohobuy_web'
,
uid
,
''
,
''
);
}
}());
window
.
cookie
=
cookie
;
window
.
setCookie
=
setCookie
;
...
...
Please
register
or
login
to post a comment