Unity and Native ads SDK - 2D box colliders - Screen Space Overlay

488 views
Skip to first unread message

mister

unread,
Feb 1, 2020, 9:34:43 PM2/1/20
to Google Mobile Ads SDK Developers
I have implemented Native ads in to Unity using the native ads sdk.

Query 1:
Is it acceptable to use 2D box colliders instead of normal 3D box colliders?
I have used 2D box colliders and clicking on the ads work fine just like normal box colliders but does the SDK still register the impressions with 2D box colliders?

Query 2:
Is it acceptable to use native ads in the UI with the canvas set to Screen Space Overlay?
I have setup the native ads on UI elements and the canvas set as Screen Space Overlay and clicks work fine but again does the SDK register impressions and clicks when setup in this way?

The reason I ask these questions is because I currently have very low impressions despite the large amount of requests and nearly 100% fill rate.

Thanks

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 3, 2020, 12:39:13 AM2/3/20
to milla...@gmail.com, google-adm...@googlegroups.com

Hi there,

 

Thank you for reaching out to us.

 

For clarification, ad impressions are counted whenever an ad is shown to a user, regardless whether or not the user has clicked on it. Note that impressions and clicks are counted only on GameObjects registered as part of a native ad.

 

As for your queries: it should be fine to use both 2D Box Colliders and the Screen Space Overlay option for your Canvas, as these should not affect ad impressions or clicks. With this in mind, I would recommend that you forward your impressions-related concerns over at the AdMob Help Center for further assistance, as the product specialists there should be able to provide better insights on those.

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5001UUzv1h:ref

mister

unread,
Feb 3, 2020, 8:56:26 AM2/3/20
to Google Mobile Ads SDK Developers
Gameobjects are being registered but it is not quite the same as the documentation suggests it should be.

Registering objects in my code is done like this...
adNative.RegisterIconImageGameObject(adIcon.gameObject);


Documentation suggests...
if (!this.nativeAd.RegisterIconImageGameObject(icon))
{
// Handle failure to register ad asset.
}

I do not think that it should make a difference but its worth mentioning maybe.

Maybe the problem is account related because Admob and Adsense report very different things. 

Admob....
230k requests
2 impressions

Adsense...
230k page views
229k impressions

So Adsense detects impressions but Admob does not. Very strange.I will go to Admob help community also but just wanted to check if I have implemented the native ads correctly first.

Thanks


Mobile Ads SDK Forum Advisor Prod

unread,
Feb 4, 2020, 12:11:26 AM2/4/20
to milla...@gmail.com, google-adm...@googlegroups.com

Hi there,

 

Your method on registering GameObjects should work, though you won't be notified by the SDK in case of registration failures. Thus, I would suggest that you follow the document on this particular point. That said, this is a rather strange issue indeed. If the issue persists, you may also try going back to using 3D Box Colliders, as well as either the Screen Space Camera or the World Space option for your Canvas, to see if those would fix it.

mista

unread,
Feb 5, 2020, 8:26:33 AM2/5/20
to Google Mobile Ads SDK Developers
Thanks I will implement screen space cameras.

Something else that is of interest is that on Adsense under the category "Active view viewable" it just says "n/a" and the line graph is 0 over the complete time period (please see attached image). So I guess maybe the ads are not viewable to the sdk?

Is this normal for native ads in unity?
How exactly does the sdk work something out as viewable?


Active View Viewable.jpg

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 5, 2020, 10:29:40 PM2/5/20
to milla...@gmail.com, google-adm...@googlegroups.com

Hi Peter,

 

I'm afraid that we do not have any insights to share with regards to the "Active View Viewable" column in the AdSense dashboard, as we can only assist in your technical concerns with the AdMob SDK. I would recommend forwarding that particular concern with either the AdSense Help Center or the AdMob Help Center for further assistance instead. The product specialists there should be able to provide better insights on this.

mista

unread,
Feb 6, 2020, 4:33:52 PM2/6/20
to Google Mobile Ads SDK Developers
Ad serving has just been limited on my Admob account which I presume was flagged as invalid activity due to having nearly 500 clicks yet only 10 impressions (an impression CTR of 4820%).

This could very well be a technical issue since impressions are not being properly detected. Is anybody actually using unity's native ads sdk successfully? I can't find any posts about people using it successfully and it seems that nobody is sure of the correct implementation (2d or 3d box colliders, screen space camera or screen space overlay).

Olik Bass

unread,
Feb 6, 2020, 6:44:13 PM2/6/20
to Google Mobile Ads SDK Developers
how to install ads on Google AdMob

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 6, 2020, 9:01:07 PM2/6/20
to milla...@gmail.com, google-adm...@googlegroups.com

Hi Peter,

 

I would recommend sticking to the implementation in the documentation in order to avoid the uncertainty of whether or not impressions are being recorded under your own implementation of the native ads. You may also check out the other threads in this forum (such as this and this) to get more insight on the native ads in practice.

 

As for the limited ad serving: you may check out this page, or you may seek further assistance from the product specialists in the AdMob Help Center.

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 6, 2020, 9:10:46 PM2/6/20
to baesh...@gmail.com, google-adm...@googlegroups.com

Hi Olik,

 

Thank you for reaching out to us.

 

You may refer to our Get Started guides for Android, iOS, or Unity to learn about the AdMob SDK, and then use our sample projects (Android / iOS / Unity) to quickly get acquainted with how the SDK works in practice. Feel free to reach out to us if you have any technical concerns or questions with the AdMob SDK.

mista

unread,
Feb 7, 2020, 7:59:23 AM2/7/20
to Google Mobile Ads SDK Developers
Thanks for the links but the documentation does not state anything about NativeAds being being attached to canvases with either Screen Space Overlay or Screen Space Camera. A technical question, is the collider responsible for impressions? Does the sdk detect impressions via raycast hits on colliders or is the collider just for detecting clicks only? How does it actually work?
With a better understanding I may be able to get this right. Searching for this topic all I am seeing is threads about implementing native ads (such as the threads you have linked) and threads about getting limited ad serving or getting banned. I have still yet to see a thread or post from anybody that shows the sdk is correctly detecting impression according to admob.

Thanks

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 10, 2020, 12:44:42 AM2/10/20
to milla...@gmail.com, google-adm...@googlegroups.com

Hi Peter,

 

For the record: Unified Native Ads for Unity were originally intended to be used as 3D GameObjects that exist in your game's World (hence the need for a Collider in order to be able to interact with them). With this in mind, using Native Ads as part of your game's 2D UI is in fact not its best use case; this should also explain the lack of documentation on this particular use case.

 

To answer your questions:

  • Is the collider responsible for impressions?
    • It is not. The Colliders are for detecting clicks to registered parts of a native ad.
  • Does the sdk detect impressions via raycast hits on colliders or is the collider just for detecting clicks only? How does it actually work?
    • As with above, the Colliders are solely for detecting clicks. Impressions should normally be counted whenever a user sees the ad ingame (again, if the relevant parts of the native ad are registered).

 

Ultimately, I would highly suggest that you first use 3D Box Colliders and either Screen Space Camera or World Space for your Canvas to see if those would fix your issue. Otherwise, you may send the details below (via Reply privately to author) so that I can further investigate this:

  • Unity version
  • AdMob SDK version
  • Copy of your project folder (replicating the issue)
  • Steps to replicate the issue

 

You may zip the entire Unity project (excluding the Library and Temp folders) in order to reduce its size, then send it to me via a shareable link from your Google Drive (or on any other file-sharing site that you prefer). Don't forget to send the shareable link via Reply privately to author.

mista

unread,
Feb 10, 2020, 9:35:52 AM2/10/20
to Google Mobile Ads SDK Developers
I have sent the requested folder through a private message. Thanks.

Fort the record I changed colliders to normal 3D box colliders in an update nearly a week ago. I also changed all canvases except 1 to Screen Space Camera but it has made no difference. Today, no impressions have been registered according to Admob but there should be around 1000 even with limited ad serving.

Thanks

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 11, 2020, 2:25:08 AM2/11/20
to milla...@gmail.com, google-adm...@googlegroups.com

Hi there,

 

Thank you for providing your sample project in private.

 

I was able to build and test your project, and found out that the app IDs and ad unit IDs being used were the test IDs on this page. I kept receiving an error code 3 after switching them to your own ad unit ID, due perhaps to the limited ad serving that your account is currently experiencing. Apart from this however, your implementation of the native ads is sound and correct, and that all the prerequisites needed for native ads to work are all accounted for (such as the Colliders, the Canvas, etc.).

 

Thus, the issue here lies somewhere in the recording of metrics in the AdMob side, which I'm afraid our team has no coverage on (since we cover only the technical concerns for the AdMob SDK). With this in mind, I would highly suggest posting your concern over at the AdMob Help Center for further assistance, as the product specialists there should be able to provide more insights on this..

海林檎

unread,
Oct 31, 2020, 8:16:21 PM10/31/20
to Google Mobile Ads SDK Developers
Hi, mista
Sorry to bother you.
May I know if you have resolve you problem?
I face the same problem as yours recently...

Thank you

mobileadssdkforumadvisor 在 2020年2月11日 星期二下午3:25:08 [UTC+8] 的信中寫道:

Mobile Ads SDK Forum Advisor Prod

unread,
Nov 2, 2020, 1:42:22 PM11/2/20
to umiri...@gmail.com, google-adm...@googlegroups.com

Hi,

If you are having any issues with getting ads to display in your app. We would suggest that you open a new post. So we can reach out to you and help to resolve this for you.

Regards,

Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5001UUzv1h:ref
Reply all
Reply to author
Forward
0 new messages