client/lib/analytics/ad-tracking.js
function recordParamsInFloodlightGtag( params ) {
	if ( ! isAdTrackingAllowed() || ! isFloodlightEnabled ) {
		return;
	}

	// Adds u4 (user id) and u5 (anonymous user id) parameters
	const defaults = assign( floodlightUserParams(), {
		// See: https://support.google.com/searchads/answer/7566546?hl=en
		allow_custom_scripts: true,
	} );

	const finalParams = [ 'event', 'conversion', assign( {}, defaults, params ) ];

	debug( 'recordParamsInFloodlightGtag:', finalParams );

	window.gtag( ...finalParams );
}
function recordParamsInFloodlightGtag( params ) {
	if ( ! isAdTrackingAllowed() || ! isFloodlightEnabled ) {
		return;
	}

	// Adds u4 (user id) and u5 (anonymous user id) parameters
	const defaults = assign( floodlightUserParams(), {
		// See: https://support.google.com/searchads/answer/7566546?hl=en
		allow_custom_scripts: true,
	} );

	const finalParams = [ 'event', 'conversion', assign( {}, defaults, params ) ];

	debug( 'recordParamsInFloodlightGtag:', finalParams );

	window.gtag( ...finalParams );
}
function recordParamsInFloodlightGtag ( params ) { if ( ! isAdTrackingAllowed ( ) || ! isFloodlightEnabled ) { return ; } // Adds u4 (user id) and u5 (anonymous user id) parameters const defaults = assign ( floodlightUserParams ( ) , { // See: https://support.google.com/searchads/answer/7566546?hl=en allow_custom_scripts : true , } ) ; const finalParams = [ 'event' , 'conversion' , assign ( { } , defaults , params ) ] ; debug ( 'recordParamsInFloodlightGtag:' , finalParams ) ; window . gtag ( ... finalParams ) ; }
Records Floodlight events using Gtag and automatically adds `u4`, `u5`, and `allow_custom_scripts: true`.

@param {Object} params An object of Floodlight params.
Records Floodlight events using Gtag and automatically adds u4 u5 and allow_custom_scripts : true .