In the modern world, companies use a large number of channels to attract customers: contextual advertising, banner advertising, advertising on radio or TV, outdoor advertising, and so on. Each of these channels may still contain placement parameters, for example, keywords or sites. Advertising is costly and a business has a clear desire to study the effectiveness of various channels and sites. In the case of online sales, everything is more or less simple and worked out, there are special tags and cookies that cling to the client’s browser and, when he makes a purchase, Google / Yandex / any other system gives you information that the client came from a certain channel via some particular keywords. But not all companies sell goods or services online, many still do it by phone, every business has its own specifics and the phone as a sales channel has not lost its relevance. In order to analyze the effectiveness of marketing channels in the case of telephone sales, call tracking is used, then we will consider the types of call tracking and describe how it can be implemented.
There are several types of call tracking - static and dynamic. In the case of static call tracking, each advertising channel is allocated its own number and assigned to it, then all calls through numbers are recorded and the analysis of statistical information shows which of the channels is most effective. This method works well if you need to track a limited number of channels. In the modern world, advertisers want to track not only the channels, but also the effectiveness of certain keywords and catch individual customers, which ultimately leads to the need for a large number of numbers.
In this case, they begin to use dynamic call tracking: with dynamic call tracking, there is a certain pool of phone numbers that is used for all channels, but a bunch of numbers with the site visitor occurs on the fly and a limited amount of time is valid if during this time If the customer calls the number, the system will track it. There is a ratio between the number of visits to the site and the number of numbers that are necessary for tracking visitors to the site from different channels, so call tracking services usually tie the price of their services to the attendance of the resource.
var outbound_call, dialed_number, agent_number, record_url, call_date, call_length = 0, failure_code, failure_reason, wsURL = "http://yourwebservice.com/api", // , - connected = false; // VoxEngine.addEventListener(AppEvents.CallAlerting, function (e) { // UTC- call_date = new Date().toUTCString(); // , dialed_number = e.destination; // URL wsURL += "?dialed_number=" + encodeURIComponent(dialed_number); // HTTP- -, Net.httpRequest(wsURL, function (res) { if (res.code == 200) { // agent_number = res.text; // outbound_call = VoxEngine.callPSTN(agent_number, dialed_number); // VoxEngine.easyProcess(e.call, outbound_call, handleCallsConnected); outbound_call.removeEventListener(CallEvents.Disconnected); outbound_call.addEventListener(CallEvents.Disconnected, handleCallDisconnected); outbound_call.removeEventListener(CallEvents.Failed); outbound_call.addEventListener(CallEvents.Failed, handleCallFailed); } else { // - - , - e.call.reject(); } }); }); // VoxEngine.addEventListener(AppEvents.Terminating, function (e) { // if (connected) { Logger.write("Dialed number: " + dialed_number + " Agent number: " + agent_number + " Date: " + call_date + " Length: " + call_length + " Record URL: " + record_url); // HTTP Net.httpRequest } else { // Logger.write("Call failed. Code: " + failure_code + " Reason: " + failure_reason); // HTTP Net.httpRequest } }); // function handleCallFailed(e) { failure_code = e.code; failure_reason = e.reason; VoxEngine.terminate(); } // function handleCallDisconnected(e) { call_length = e.duration; VoxEngine.terminate(); } // function handleCallsConnected(call1, call2) { connected = true; outbound_call.addEventListener(CallEvents.RecordStarted, function (e) { record_url = e.url; }); outbound_call.record(); // start call recording } var inbound_call, ext = ''; // VoxEngine.addEventListener(AppEvents.CallAlerting, function (e) { inbound_call = e.call; inbound_call.addEventListener(CallEvents.ToneReceived, function (callevent) { callevent.call.stopPlayback(); ext += callevent.tone; if (ext.length == 4) { wsURL += "?dialed_number=" + encodeURIComponent(dialed_number) + "&ext=" + ext; // Net.httpRequest(wsURL, function (res) { if (res.code == 200) { // agent_number = res.text; // outbound_call = VoxEngine.callPSTN(agent_number, dialed_number); // VoxEngine.easyProcess(e.call, outbound_call, handleCallsConnected); outbound_call.removeEventListener(CallEvents.Disconnected); outbound_call.addEventListener(CallEvents.Disconnected, handleCallDisconnected); outbound_call.removeEventListener(CallEvents.Failed); outbound_call.addEventListener(CallEvents.Failed, handleCallFailed); } else { // - - , - inbound_call.reject(); } }); } }); inbound_call.addEventListener(CallEvents.Connected, function (callevent) { inbound_call.say(", .", Language.RU_RUSSIAN_FEMALE); }); inbound_call.answer(); }); Source: https://habr.com/ru/post/250899/
All Articles