Created
April 7, 2014 08:43
-
-
Save edtoken/10016800 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
/** | |
* trigger to send yandex tag | |
*/ | |
window.sendyatag(this, data); | |
window.sendyatag = function(obj, data){ | |
var tag; | |
tag = ''; | |
var d = obj.data; | |
d = d.split('&'); | |
for(var i=0; i<d.length;i++){ | |
values = d[i].split('='); | |
if(values[0] !== 'yandextag') continue; | |
tag = values[1]; | |
} | |
if(tag !== ''){ | |
tag = decodeURIComponent(tag); | |
var sendtag = yaCounter17593912.reachGoal(tag); | |
// console.log('send yandex tag', tag, sendtag); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment