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

Function onAdAction

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

Source from the content-addressed store, hash-verified

328 });
329
330 const onAdAction = (
331 action: AdActions,
332 ad: Ad,
333 extra?: Record<string, unknown>,
334 ) => {
335 logEvent(
336 adLogEvent(action, ad, {
337 columns: virtualizedNumCards,
338 column,
339 row,
340 extra: { ...feedLogExtra(feedName, ranking).extra, ...extra },
341 }),
342 );
343 };
344
345 const onAdViewable = (ad: Ad, data: ViewabilityData) =>
346 onAdAction(AdActions.Viewable, ad, viewabilityLogExtra(data));

Callers 9

CommentAdFunction · 0.85
InlineAdFunction · 0.85
SidebarAdFunction · 0.85
onAdViewableFunction · 0.85
FeedItemComponentFunction · 0.85
FeedHeroFunction · 0.85
AdAsCommentFunction · 0.85
PostSidebarAdWidgetFunction · 0.85
SimilarSquadsListFunction · 0.85

Calls 3

adLogEventFunction · 0.90
feedLogExtraFunction · 0.90
logEventFunction · 0.85

Tested by

no test coverage detected