Records an order/sign_up in Google Ads Gtag

@param {Object} cart - cart as `CartValue` object
@param {Number} orderId - the order id
@param {Object} wpcomJetpackCartInfo - info about WPCOM and Jetpack in the cart
@returns {void}
function recordOrderInGoogleAds( cart, orderId, wpcomJetpackCartInfo ) {
	if ( ! isAdTrackingAllowed() ) {
		debug( 'recordOrderInGoogleAds: skipping as ad tracking is disallowed' );
		return;
	}

	if ( isJetpackGoogleAdsGtagEnabled ) {
		if ( wpcomJetpackCartInfo.containsJetpackProducts ) {
			const params = [
				'event',
				'conversion',
				{
					send_to: TRACKING_IDS.jetpackGoogleAdsGtagPurchase,
					value: wpcomJetpackCartInfo.jetpackCost,
					currency: cart.currency,
					transaction_id: orderId,
				},
			];
			debug( 'recordOrderInGoogleAds: Record Jetpack Purchase', params );
			window.gtag( ...params );
		}
	}

	if ( isWpcomGoogleAdsGtagEnabled ) {
		if ( wpcomJetpackCartInfo.containsWpcomProducts ) {
			const params = [
				'event',
				'conversion',
				{
					send_to: TRACKING_IDS.wpcomGoogleAdsGtagPurchase,
					value: wpcomJetpackCartInfo.wpcomCost,
					currency: cart.currency,
					transaction_id: orderId,
				},
			];
			debug( 'recordOrderInGoogleAds: Record WPCom Purchase', params );
			window.gtag( ...params );
		}
	}
}