question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Impressions not logged within ScrollView / FlatList

See original GitHub issue

This is not a bug in this library, but more of a compatibility warning between React Native and the current native FB Audience Network SDKs.

Short Background

When running Native Ads, Facebook’s SDK tries to figure out exactly when a user sees an ad. For example, if an ad is shown inside a scrolling view, Facebook would ideally log an impression only if the ad was actually visible to the user.

The Problem

Currently, the Audience Network SDK isn’t logging impressions correctly for native ads nested within React Native scroll components.

Ads are being pulled and displayed just fine - but the piece of code in FB’s SDK responsible for detecting impressions isn’t working with React Native’s FlatList and ScrollView, which work differently from their native counterparts.

What Now?

I’ve contacted the Audience Network team to try and find a solution to this problem. I’m opening this issue to raise awareness and make sure that people understand why this might be happening in their own app.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
perrosnkcommented, Mar 29, 2020

This library doesn’t seem to be maintained. To anyone who is interested I recently discovered this: https://github.com/ammarahm-ed/react-native-admob-native-ads/

1reaction
Trancevercommented, Dec 11, 2018

@grabbou @satya164 Do you know someone from Facebook who we could ask about that issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

FlatList inside ScrollView doesn't scroll - Stack Overflow
The issue is that the parent component is the only one registering the scroll event. The solution is to contextually decide which component ......
Read more >
Building a great scrollable list in React Native with FlatList
In this post I'll show you how these two technologies can work together seamlessly in React Native's new FlatList component.
Read more >
Deep Linking in React Native — Scroll to Element - Ars Futura
The easiest way to get this working is to use the FlatList component — if it is compatible with your data on that...
Read more >
How to scroll FlatList to some index immediately after scrolling?
Coding example for the question How to scroll FlatList to some index immediately after scrolling?-React Native.
Read more >
Common bugs in React Native ScrollView and how to fix them
Because FlatList only renders elements that are currently showing on the screen — not all the elements at once — it is capable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found