> Keyed by touch ("first", "last"). */ function wpat_get(): array { return \WPAttributionTracker\Store::current(); } } if ( ! function_exists( 'wpat_touch' ) ) { /** * A single touch record. * * @param string $touch Either "first" or "last". * @return array */ function wpat_touch( string $touch = 'last' ): array { return \WPAttributionTracker\Store::current()[ $touch ] ?? array(); } } if ( ! function_exists( 'wpat_value' ) ) { /** * A single attribution value. * * @param string $key Storage key, for example "source" or "gclid". * @param string $touch Either "first" or "last". */ function wpat_value( string $key, string $touch = 'last' ): string { return \WPAttributionTracker\Store::token_value( $touch . '_' . $key ); } } if ( ! function_exists( 'wpat_channel_label' ) ) { /** * Human readable name for a stored channel value. */ function wpat_channel_label( string $channel ): string { return \WPAttributionTracker\Channels::label( $channel ); } }