src/Placement.js
/**
         * Emits the widget impression event
         * @param declined
         * @private
         */
Emits the widget impression event
@param declined
@private
Emits the widget impression event @param declined @private
_reportWidgetLoad(declined) {
            const res = this._response || {};
            const data = res.data || { results: [] };
            this._metricBase.m.decl = declined || '0';
            this._metricBase.m.res_bf = data.backfilled ? 1 : 0; 
            this._metricBase.m.res_sf = data.shortfilled ? 1 : 0; 
            this._metricBase.m.res_spltfl = data.splitfilled ? 1 : 0; 
            this._metricBase.m.res_total = data.total || 0; 
            this._metricBase.m.res_type = data.type; 
            this._metricBase.m.res_length = data.results.length; 
            okanjo.metrics.create(this._metricBase)
                .type(Metrics.Object.widget, Metrics.Event.impression)
                .meta(this.getConfig())
                .element(this.element) 
                .viewport()
                .widget(this.element)
                .send();
            this._addOnceViewedHandler(this.element, () => {
                okanjo.metrics.create(this._metricBase)
                    .type(Metrics.Object.widget, Metrics.Event.view)
                    .meta(this.getConfig())
                    .element(this.element)
                    .viewport()
                    .widget(this.element)
                    .send();
            });
        }
_reportWidgetLoad ( declined ) { const res = this . _response || { } ; const data = res . data || { results : [ ] } ; this . _metricBase . m . decl = declined || '0' ; this . _metricBase . m . res_bf = data . backfilled ? 1 : 0 ; this . _metricBase . m . res_sf = data . shortfilled ? 1 : 0 ; this . _metricBase . m . res_spltfl = data . splitfilled ? 1 : 0 ; this . _metricBase . m . res_total = data . total || 0 ; this . _metricBase . m . res_type = data . type ; this . _metricBase . m . res_length = data . results . length ; okanjo . metrics . create ( this . _metricBase ) . type ( Metrics . Object . widget , Metrics . Event . impression ) . meta ( this . getConfig ( ) ) . element ( this . element ) . viewport ( ) . widget ( this . element ) . send ( ) ; this . _addOnceViewedHandler ( this . element , ( ) => { okanjo . metrics . create ( this . _metricBase ) . type ( Metrics . Object . widget , Metrics . Event . view ) . meta ( this . getConfig ( ) ) . element ( this . element ) . viewport ( ) . widget ( this . element ) . send ( ) ; } ) ; }
Emits the widget impression event
 @param declined
 @private
Emits the widget impression event @param declined @private
// If this is declined, mark future events as declined too // Attach other main response attributes to all future events // whether the response used the back fill flow // whether the response used the short fill flow // whether the response used the short fill flow // how many total candidate results were available given filters // what the given resource type was // number of resources delivered // Track impression // this might not be all that useful cuz the content hasn't been rendered yet // Start watching for a viewable impression