$device ? $device['type'] : '', 'browser' => $device ? mb_substr( $device['browser'], 0, 40 ) : '', 'country' => $place['country'], 'city' => $place['city'], 'lat' => (float) $place['lat'], 'lon' => (float) $place['lon'], 'geo' => $place['source'], ); } /** * Column values for a lead sent by a visitor that Dealroot tracks. A lead without * attribution, e.g. an order a payment service reports, gets none. * * @param array|null $attribution Output of Attribution::from_request(). * @return array */ public static function for_lead( $attribution ) { if ( empty( $attribution['first'] ) ) { return array(); } return self::columns( (string) ( $attribution['tz'] ?? '' ) ); } }