What is the best way to track the number of native ad impressions and clicks through the MoPubRecyclerAdapter?
Methods Available in the SDK:
I’m not able to add the MoPubNativeEventListener and MoPubNativeNetworkListener to the MoPubRecyclerAdapter. The Event and Network Listeners appear to be part of MoPubNative, but MoPubRecyclerAdapter doesn’t appear to inherit MoPubNative, have access to MoPubNativeEventListener/NetworkListener, or have its own Event and Network listeners?
MoPubRecyclerAdapter does have onAdLoaded and onAdRemoved, but they only seem indirectly related, while the Event and Network Listeners seem directly related, to impressions and clicks. To be more specific about the onAdLoaded method, available via MoPubNativeAdLoadedListener, it does indicate when an ad is loaded and the position, but the loaded ad might not be visible to the user. If the ad is loaded but isn’t visible to the user, is that considered an impression? If not, how best to determine when the onAdLoaded is visible in order to count an impression?
There doesn’t seem to be an accessible ad click listener exposed, which is unusual for an Ad SDK. As a workaround, I’ve added this method: http://stackoverflow.com/a/26196831/1652110, which requires a bit more work than using a commonly exposed ad listener.