Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/plugin/Assets/GoogleMobileAds/Common/RcsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ protected override bool ValidateCertificate(byte[] certificateData)

// Batching triggers can be overridden by subclasses. We don't need to expose them in Unity
// Editor. If any trigger fires, a batch of items will get sent.
protected virtual int CountThreshold => 20;
protected virtual float TimeThresholdInSeconds => 120.0f;
protected virtual int CountThreshold => 1;
protected virtual float TimeThresholdInSeconds => 10.0f;

// RCS endpoint for reporting. The `e=1` URL parameter defines JSPB encoding.
private const string ProdRcsUrl = "https://pagead2.googlesyndication.com/pagead/ping?e=1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace GoogleMobileAds.Android
{
public class NextGenBannerAdClient : AndroidJavaProxy, IBannerClient
{
private readonly IInsightsEmitter _insightsEmitter = InsightsEmitter.Instance;

protected internal AndroidJavaObject bannerView;

String adUnitId;
Expand Down Expand Up @@ -152,6 +154,14 @@ public IResponseInfoClient GetResponseInfoClient()

public void onAdLoaded()
{
_insightsEmitter.Emit(new Insight()
{
Name = Insight.CuiName.AdLoaded,
Format = Insight.AdFormat.Banner,
AdUnitId = this.adUnitId,
Success = true
});

if (this.OnAdLoaded != null)
{
this.OnAdLoaded(this, EventArgs.Empty);
Expand Down Expand Up @@ -213,6 +223,13 @@ internal void onAdImpression()
{
if (this.OnAdImpressionRecorded != null)
{
_insightsEmitter.Emit(new Insight()
{
Name = Insight.CuiName.AdShown,
Format = Insight.AdFormat.Banner,
AdUnitId = this.adUnitId,
Success = true
});
this.OnAdImpressionRecorded();
}
}
Expand Down