@ -280,23 +280,33 @@ internal class ReleaseMetricController(
}
}
}
}
Component . FEATURE _FXSUGGEST to FxSuggestFacts . Items . AMP _SUGGESTION _CLICKED -> {
Component . FEATURE _FXSUGGEST to FxSuggestFacts . Items . AMP _SUGGESTION _CLICKED ,
Component . FEATURE _FXSUGGEST to FxSuggestFacts . Items . WIKIPEDIA _SUGGESTION _CLICKED ,
-> {
FxSuggest . pingType . set ( " fxsuggest-click " )
FxSuggest . pingType . set ( " fxsuggest-click " )
FxSuggest . isClicked . set ( true )
FxSuggest . isClicked . set ( true )
( metadata ?. get ( FxSuggestFacts . MetadataKeys . POSITION ) as ? Long ) ?. let {
( metadata ?. get ( FxSuggestFacts . MetadataKeys . POSITION ) as ? Long ) ?. let {
FxSuggest . position . set ( it )
FxSuggest . position . set ( it )
}
}
( metadata ?. get ( FxSuggestFacts . MetadataKeys . INTERACTION _INFO ) as ? FxSuggestInteractionInfo . Amp ) ?. let {
when ( val clickInfo = metadata ?. get ( FxSuggestFacts . MetadataKeys . INTERACTION _INFO ) ) {
FxSuggest . blockId . set ( it . blockId )
is FxSuggestInteractionInfo . Amp -> {
FxSuggest . advertiser . set ( it . advertiser )
FxSuggest . blockId . set ( clickInfo . blockId )
FxSuggest . reportingUrl . set ( it . reportingUrl )
FxSuggest . advertiser . set ( clickInfo . advertiser )
FxSuggest . iabCategory . set ( it . iabCategory )
FxSuggest . reportingUrl . set ( clickInfo . reportingUrl )
FxSuggest . contextId . set ( UUID . fromString ( it . contextId ) )
FxSuggest . iabCategory . set ( clickInfo . iabCategory )
FxSuggest . contextId . set ( UUID . fromString ( clickInfo . contextId ) )
}
is FxSuggestInteractionInfo . Wikipedia -> {
FxSuggest . advertiser . set ( " wikipedia " )
FxSuggest . contextId . set ( UUID . fromString ( clickInfo . contextId ) )
}
}
}
Pings . fxSuggest . submit ( )
Pings . fxSuggest . submit ( )
}
}
Component . FEATURE _FXSUGGEST to FxSuggestFacts . Items . AMP _SUGGESTION _IMPRESSED -> {
Component . FEATURE _FXSUGGEST to FxSuggestFacts . Items . AMP _SUGGESTION _IMPRESSED ,
Component . FEATURE _FXSUGGEST to FxSuggestFacts . Items . WIKIPEDIA _SUGGESTION _IMPRESSED ,
-> {
FxSuggest . pingType . set ( " fxsuggest-impression " )
FxSuggest . pingType . set ( " fxsuggest-impression " )
( metadata ?. get ( FxSuggestFacts . MetadataKeys . IS _CLICKED ) as ? Boolean ) ?. let {
( metadata ?. get ( FxSuggestFacts . MetadataKeys . IS _CLICKED ) as ? Boolean ) ?. let {
FxSuggest . isClicked . set ( it )
FxSuggest . isClicked . set ( it )
@ -304,12 +314,18 @@ internal class ReleaseMetricController(
( metadata ?. get ( FxSuggestFacts . MetadataKeys . POSITION ) as ? Long ) ?. let {
( metadata ?. get ( FxSuggestFacts . MetadataKeys . POSITION ) as ? Long ) ?. let {
FxSuggest . position . set ( it )
FxSuggest . position . set ( it )
}
}
( metadata ?. get ( FxSuggestFacts . MetadataKeys . INTERACTION _INFO ) as ? FxSuggestInteractionInfo . Amp ) ?. let {
when ( val impressionInfo = metadata ?. get ( FxSuggestFacts . MetadataKeys . INTERACTION _INFO ) ) {
FxSuggest . blockId . set ( it . blockId )
is FxSuggestInteractionInfo . Amp -> {
FxSuggest . advertiser . set ( it . advertiser )
FxSuggest . blockId . set ( impressionInfo . blockId )
FxSuggest . reportingUrl . set ( it . reportingUrl )
FxSuggest . advertiser . set ( impressionInfo . advertiser )
FxSuggest . iabCategory . set ( it . iabCategory )
FxSuggest . reportingUrl . set ( impressionInfo . reportingUrl )
FxSuggest . contextId . set ( UUID . fromString ( it . contextId ) )
FxSuggest . iabCategory . set ( impressionInfo . iabCategory )
FxSuggest . contextId . set ( UUID . fromString ( impressionInfo . contextId ) )
}
is FxSuggestInteractionInfo . Wikipedia -> {
FxSuggest . advertiser . set ( " wikipedia " )
FxSuggest . contextId . set ( UUID . fromString ( impressionInfo . contextId ) )
}
}
}
Pings . fxSuggest . submit ( )
Pings . fxSuggest . submit ( )
}
}