<script type="text/javascript">
jQuery(function($) {
tvc_lc="RUB";
ga("require", "ec", "ec.js");
ga("set", "&cu", tvc_lc);
jQuery("button[class*=single_add_to_cart_button]").click(function() {
// Enhanced E-commerce Add to cart clicks
ga("ec:addProduct", {
"id" : tvc_po.tvc_i,
"name": tvc_po.tvc_n,
"category" :tvc_po.tvc_c,
"price": tvc_po.tvc_p,
"quantity" :jQuery(this).parent().find("input[name=quantity]").val()
});
ga("ec:setAction", "add");
ga("send", "event", "Enhanced-Ecommerce","click", "add_to_cart_click", {"nonInteraction": 1});
});
tvc_po={"tvc_id":"41698","tvc_i":"\u041d\u0421-0005839","tvc_n":"\u041a\u0440\u0443\u0433\u043b\u044b\u0439 \u043a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 \u0441\u0435\u0440\u0438\u0438 Flow 160","tvc_c":"\u041a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0432 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 BALLU MACHINE \u0441\u0435\u0440\u0438\u0438 FLOW","tvc_p":"5137.40"};
ga("require", "ec", "ec.js");
ga("ec:addProduct", {
"id": tvc_po.tvc_i, // Product details are provided in an impressionFieldObject.
"name": tvc_po.tvc_n,
"category":tvc_po.tvc_c,
});
ga("ec:setAction", "detail");
ga("send", "event", "Enhanced-Ecommerce", "load","product_impression_pp", {"nonInteraction": 1});
homepage_json_ATC_link=[];
tvc_fp=[];
tvc_rcp=[];
tvc_rdp={"http:\/\/ballu.pro\/shop\/vent\/ventilyatory\/flow\/kruglyj-kanalnyj-ventilyator-v-plastikovom-korpuse-flow-100\/":{"tvc_id":"41695","tvc_i":"\u041d\u0421-0005837","tvc_n":"\u041a\u0440\u0443\u0433\u043b\u044b\u0439 \u043a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 Flow 100","tvc_p":"2334.95","tvc_c":"\u041a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0432 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 BALLU MACHINE \u0441\u0435\u0440\u0438\u0438 FLOW","tvc_po":1},"http:\/\/ballu.pro\/shop\/vent\/ventilyatory\/flow\/kruglyj-kanalnyj-ventilyator-v-plastikovom-korpuse-flow-125\/":{"tvc_id":"41697","tvc_i":"\u041d\u0421-0005838","tvc_n":"\u041a\u0440\u0443\u0433\u043b\u044b\u0439 \u043a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 Flow 125","tvc_p":"2627.35","tvc_c":"\u041a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0432 \u043f\u043b\u0430\u0441\u0442\u0438\u043a\u043e\u0432\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u0435 BALLU MACHINE \u0441\u0435\u0440\u0438\u0438 FLOW","tvc_po":2}};
prodpage_json_ATC_link={"\/shop\/vent\/ventilyatory\/flow\/kruglyj-kanalnyj-ventilyator-v-plastikovom-korpuse-serii-flow-160\/?add-to-cart=41695":{"ATC-link":"http:\/\/ballu.pro\/shop\/vent\/ventilyatory\/flow\/kruglyj-kanalnyj-ventilyator-v-plastikovom-korpuse-flow-100\/"},"\/shop\/vent\/ventilyatory\/flow\/kruglyj-kanalnyj-ventilyator-v-plastikovom-korpuse-serii-flow-160\/?add-to-cart=41697":{"ATC-link":"http:\/\/ballu.pro\/shop\/vent\/ventilyatory\/flow\/kruglyj-kanalnyj-ventilyator-v-plastikovom-korpuse-flow-125\/"}};
tvc_pgc=[];
catpage_json_ATC_link=[];
ga("require", "ec", "ec.js");
ga("set", "&cu", tvc_lc);
function t_products_impre_clicks(t_json_name,t_action,t_list){
t_send_threshold=0;
t_prod_pos=0;
t_json_length=Object.keys(t_json_name).length
for(var t_item in t_json_name) {
t_send_threshold++;
t_prod_pos++;
ga("ec:addImpression", {
"id": t_json_name[t_item].tvc_i,
"name": t_json_name[t_item].tvc_n,
"category": t_json_name[t_item].tvc_c,
"list":t_list,
"price": t_json_name[t_item].tvc_p,
"position": t_json_name[t_item].tvc_po,
});
if(t_json_length > 6){
if((t_send_threshold%6)==0){
t_json_length=t_json_length-6;
ga("send", "event", "Enhanced-Ecommerce","load","product_impression_"+t_action , {"nonInteraction": 1});
}
}else{
t_json_length--;
if(t_json_length==0){
ga("send", "event", "Enhanced-Ecommerce","load", "product_impression_"+t_action, {"nonInteraction": 1});
}
}
}
}
//function for comparing urls in json object
function prod_exists_in_JSON(t_url,t_json_name,t_list,t_action){
if(t_json_name.hasOwnProperty(t_url)){
t_call_fired=true;
ga("ec:addProduct", {
"id": t_json_name[t_url].tvc_i,
"name": t_json_name[t_url].tvc_n,
"category": t_json_name[t_url].tvc_c,
"price": t_json_name[t_url].tvc_p,
"position": t_json_name[t_url].tvc_po,
});
ga("ec:setAction", "click", {"list": t_list});
ga("send", "event", "Enhanced-Ecommerce","click", "product_click_"+t_action, {"nonInteraction": 1});
}else{
t_call_fired=false;
}
return t_call_fired;
}
function prod_ATC_link_exists(t_url,t_ATC_json_name,t_prod_data_json,t_qty){
t_prod_url_key=t_ATC_json_name[t_url]["ATC-link"];
if(t_prod_data_json.hasOwnProperty(t_prod_url_key)){
t_call_fired=true;
// Enhanced E-commerce Add to cart clicks
ga("ec:addProduct", {
"id": t_prod_data_json[t_prod_url_key].tvc_i,
"name": t_prod_data_json[t_prod_url_key].tvc_n,
"category": t_prod_data_json[t_prod_url_key].tvc_c,
"price": t_prod_data_json[t_prod_url_key].tvc_p,
"quantity" : t_qty
});
ga("ec:setAction", "add");
ga("send", "event", "Enhanced-Ecommerce","click", "add_to_cart_click",{"nonInteraction": 1});
}else{
t_call_fired=false;
}
return t_call_fired;
}
if(tvc_rdp.length !== 0){
t_products_impre_clicks(tvc_rdp,"rdp","Related Products");
}
//product click - image and product name
jQuery("a:not(.product_type_variable, .product_type_grouped)").on("click",function(){
t_url=jQuery(this).attr("href");
//prod page related call for click
prod_exists_in_JSON(t_url,tvc_rdp,"Related Products","rdp");
});
//Prod ATC link click in related product section
jQuery("a[href*=add-to-cart]").on("click",function(){
t_url=jQuery(this).attr("href");
t_qty=$(this).parent().find("input[name=quantity]").val();
//default quantity 1 if quantity box is not there
if(t_qty=="" || t_qty===undefined){
t_qty="1";
}
prod_ATC_link_exists(t_url,prodpage_json_ATC_link,tvc_rdp,t_qty);
});
tvc_smd={"tvc_wcv":"2.6.7","tvc_wpv":"4.6.1","tvc_eev":"1.0.18","tvc_cnf":{"t_ee":"yes","t_df":false,"t_gUser":false,"t_UAen":"no","t_thr":"6"}};
});
</script>