function gkdEctTrack(action, pid, desc) { var async = action == 'remove' ? false : true; $.ajax({ url: 'index.php?route=geekodev/analytics/getTrackData', type: 'post', dataType: 'json', cache: false, async: async, data: {pid: pid, action: action}, success: function(res) { if (typeof res[0] !== 'undefined') { gkaLayer.push({ 'event': action, 'ecommerce': { 'add': { 'products': res } } }); /* ga('ec:addProduct', res[0]); ga('ec:setAction', action); ga('send', 'event', $(document).find('title').text(), desc, res[0].name); */ } } }); } function gkdEctTrackCheckout(step, desc) { if (typeof jQuery != 'undefined') { $.ajax({ url: 'index.php?route=geekodev/analytics/getTrackData', type: 'post', dataType: 'json', cache: false, data: {cart:1}, success: function(res) { if (typeof res[0] !== 'undefined') { gkaLayer.push({ 'event': 'checkout', 'ecommerce': { 'checkout': { 'actionField': {'step': step}, 'products': res } } }); } /* for(var i=0; iload->model('tool/seo_package'); $json = $this->model_tool_seo_package->getTrackData(); header('Content-Type: application/json'); echo json_encode($json); } }