MCPcopy Create free account
hub / github.com/dailydotdev/apps / onAdAction

Function onAdAction

packages/shared/src/components/FeedItemComponent.tsx:358–371  ·  view source on GitHub ↗
(
    action: AdActions,
    ad: Ad,
    extra?: Record<string, unknown>,
  )

Source from the content-addressed store, hash-verified

356 });
357
358 const onAdAction = (
359 action: AdActions,
360 ad: Ad,
361 extra?: Record<string, unknown>,
362 ) => {
363 logEvent(
364 adLogEvent(action, ad, {
365 columns: virtualizedNumCards,
366 column,
367 row,
368 extra: { ...feedLogExtra(feedName, ranking).extra, ...extra },
369 }),
370 );
371 };
372
373 const onAdViewable = (ad: Ad, data: ViewabilityData) =>
374 onAdAction(AdActions.Viewable, ad, viewabilityLogExtra(data));

Callers 4

onAdViewableFunction · 0.85
FeedItemComponentFunction · 0.85
AdAsCommentFunction · 0.85
PostSidebarAdWidgetFunction · 0.85

Calls 3

adLogEventFunction · 0.90
feedLogExtraFunction · 0.90
logEventFunction · 0.85

Tested by

no test coverage detected