toMatchGaTracking( beacons, assert, source ) {
        if ( typeof process.env.DEBUG_GA_BEACON !== "undefined" ) {
          console.info( "toMatchGaTracking#1", { action: assert.action, beacons } );
        }
        try {
          const GA = "Google Analytics";
          let matches, found, precise;
          switch( assert.action ) {
            case "pageview":
              found = beacons.filter( res => res.type === assert.action );
              return expectReturn( !!found.length,
                `[${ source }] expected to send "pageview" data to ${ GA }, but it is not sent` );
            case "event":
            case "social":
            case "screenview":
            case "timing":
            case "exception":
              found = beacons.filter( res => res.type === assert.action );

              matches = filterGaBeacons( found, assert );
              validateGaBeacons( matches, assert );

              return expectReturn( !!matches.length, `[${ source }] expected to send "${ assert.action }" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

            case "ecProductImpression":
              found = beacons.filter( beacon => beacon.ec.impressions.length );
              // we need now an even per impression
              precise = found.reduce( ( carry, b ) => {
                b.ec.impressions.forEach( i => {
                  const data = b;
                  data.ec.impressions= [ i ];
                  carry.push( data );
                });
                return carry;
              }, []);
              matches = filterGaBeacons( precise, assert );
              validateGaBeacons( matches, assert );
              return expectReturn( !!matches.length, `[${ source }] expected to send "EC: Product Impression" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

            case "ecProductClick":
              found = beacons.filter( beacon => beacon.ec.action.name === "click" );
              validateGaBeacons( found, assert );
              return expectReturn( !!found.length,
                `[${ source }] expected to send "EC: Product Click" data to ${ GA }, but it is not sent` );

            case "ecProductDetails":
              found = beacons.filter( beacon => beacon.ec.action.name === "detail" );
              validateGaBeacons( found, assert );
              return expectReturn( !!found.length,
                `[${ source }] expected to send "EC: Product Details View" data to ${ GA }, but it is not sent` );

             case "ecAddToCart":
              found = beacons.filter( beacon => beacon.ec.action.name === "add" );
              validateGaBeacons( found, assert );
              return expectReturn( !!found.length,
                `[${ source }] expected to send "EC: Add Products to cart" data to ${ GA }, but it is not sent` );

            case "ecRemoveFromCart":
              found = beacons.filter( beacon => beacon.ec.action.name === "remove" );
              validateGaBeacons( found, assert );
              return expectReturn( !!found.length,
                `[${ source }] expected to send "EC: Remove Products from cart" data to ${ GA }, but it is not sent` );

            case "ecCheckout":
              found = beacons.filter( beacon => ( beacon.ec.action.name === "checkout"
                || beacon.ec.action.name === "checkout_option" ) );
              matches = filterGaBeacons( found, assert );
              validateGaBeacons( found, assert );
              return expectReturn( !!matches.length,
                `[${ source }] expected to send "EC: Checkout" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

            case "ecRefund":
              found = beacons.filter( beacon => beacon.ec.action.name === "refund" );
              matches = filterGaBeacons( found, assert );
              validateGaBeacons( matches, assert );
              return expectReturn( !!matches.length,
                `[${ source }] expected to send "EC: Refund" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

            case "ecPurchase":
              found = beacons.filter( beacon => beacon.ec.action.name === "purchase" );
              matches = filterGaBeacons( found, assert );
              validateGaBeacons( matches, assert );
              return expectReturn( !!matches.length,
                `[${ source }] expected to send "EC: Purchase" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

            case "ecPromotion":
              found = beacons.filter( beacon => beacon.data.action === "add promo" || beacon.ec.promotions.length );
              matches = filterGaBeacons( found, assert );
              validateGaBeacons( matches, assert );
              return expectReturn( !!matches.length,
                `[${ source }] expected to send "EC: Promotion" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

            case "ecommerceAddTransaction":
              found = beacons.filter( beacon => beacon.type === "transaction" );
              matches = filterGaBeacons( found, assert );
              validateGaBeacons( found, assert );
              return expectReturn( !!matches.length,
                `[${ source }] expected to send "EC: Adding a Transaction" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

             case "ecommerceAddItem":
              found = beacons.filter( beacon => beacon.type === "item" );
              matches = filterGaBeacons( found, assert );
              validateGaBeacons( found, assert );
              return expectReturn( !!matches.length,
                `[${ source }] expected to send "EC: Adding an Item" data `
                + `(${ valsToString( assert ) }) to ${ GA }, but it is not sent` );

          }
      } catch ( err ) {
        // console.error( err );
        return expectReturn( false, `[${ source }] expected no exceptions, but one thrown: ${ err.message }` );
      }
    }
@param {UaBeacon[]} beacons [{ type, data, ec },..]
@param {Object} assert
@param {String} source
@returns {Object}