Shoora
5/15/2019 - 1:13 PM

sent.js

/**
* 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);
    }

};