...
Add Google Analytics via SQL by setting the Webhook and Webhook parameters in one query for a given tracking number:
Code Block language sql
UPDATEtrackingnumbers
SET
webhook_url='http://www.google-analytics.com/collect?v=1&tid=UA-4472484-1&t=event&ec=Call&an=CallPotentialTracking&ni=1&',
webhook_params='[{"param_name":"lead","system_variable":"{system.LeadID}"},{"param_name":"el","system_variable":"{system.AdName}"},{"param_name":"cs","system_variable":"{system.AdName}"},{"param_name":"cm","system_variable":"{system.AdName}"},{"param_name":"cid","system_variable":"{system.CustPhone}"},{"param_name":"cd2","system_variable":"{system.LocEmail}"},{"param_name":"ea","system_variable":"{system.LocEmail}"},{"param_name":"cd6","system_variable":"{system.CustPhone}"}]'
WHEREcall_number=1XXXXXXXXXX