Fix email tracking: return pixel, secure parameters, optimize query, fix count