-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impression tracker for original API #804
base: master
Are you sure you want to change the base?
Conversation
More verbose logs.
@@ -449,6 +477,8 @@ public void onFetchCompleted(BidResponse response) { | |||
HashMap<String, String> keywords = response.getTargeting(); | |||
Util.apply(keywords, adObject); | |||
originalListener.onComplete(ResultCode.SUCCESS); | |||
|
|||
registerVisibilityTrackerIfNeeded(bidResponse); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach doesn't look reliable. Switching the tracker on/off for each result of the bid fetching may lead to gaps in tracking.
Let's implement it in the following.
- start viewability tracking on calling of
activatePrebidImpressionTracker
- stop tracking on destroying the AdUnit object
- once the tracked view meets the impression tracking criteria - check the content, and if it contains PUC - track the respective impression.
@@ -65,7 +72,11 @@ public abstract class AdUnit { | |||
@Nullable | |||
protected BidResponse bidResponse; | |||
|
|||
protected final VisibilityMonitor visibilityMonitor = new VisibilityMonitor(); | |||
protected WeakReference<View> adViewReference = new WeakReference<>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we hold adViewReference in VisibilityMonitor?
No description provided.