Created
October 26, 2016 08:31
-
-
Save Gegam/207c2906c3f8ce371c1abf3b22a659ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //GA-counter: | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
| ga('create', 'UA-81706562-21', 'auto'); | |
| ga('require', 'displayfeatures'); | |
| try { | |
| var args = JSON.parse(location.search.match(/custom_args=(.+)($|&)/)[1]); | |
| [ 'campaignName' | |
| , 'campaignSource' | |
| , 'campaignMedium' | |
| , 'campaignContent' | |
| ].forEach(function (argName) { | |
| ga('set', argName, args[argName]); | |
| }) | |
| } catch (err) {} | |
| ga('set', 'location', location.protocol + '//' + location.host + location.pathname); | |
| ga('set', 'referrer', location.protocol + '//' + location.host); | |
| ga('send', 'pageview', '/'); | |
| /*** | |
| ok.ru/game/gamename?custom_args={uri_encoded_json}, где uri_encoded_json: | |
| encodeURIComponent(`{ | |
| "campaignName": "", | |
| "campaignSource": "", | |
| "campaignMedium": "", | |
| "campaignContent": "" | |
| }`) | |
| ***/ | |
| <!-- Rating@Mail.ru counter --> | |
| <script type="text/javascript"> | |
| var _tmr = window._tmr || (window._tmr = []); | |
| _tmr.push({id: "2828520", type: "pageView", start: (new Date()).getTime()}); | |
| (function (d, w, id) { | |
| if (d.getElementById(id)) return; | |
| var ts = d.createElement("script"); ts.type = "text/javascript"; ts.async = true; ts.id = id; | |
| ts.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//top-fwz1.mail.ru/js/code.js"; | |
| var f = function () {var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ts, s);}; | |
| if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } | |
| })(document, window, "topmailru-code"); | |
| </script><noscript><div style="position:absolute;left:-10000px;"> | |
| <img src="//top-fwz1.mail.ru/counter?id=2828520;js=na" style="border:0;" height="1" width="1" alt="Рейтинг@Mail.ru" /> | |
| </div></noscript> | |
| <!-- //Rating@Mail.ru counter --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment