You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More an enhancement than an issue probably, but I think that it'd be nice if the library gave you a way to know when the ad was not rendered because of reasons unrelated to it being empty or the script not being loaded.
The case I'm considering is either when the ad is not in viewport or the slot that matches the current viewport size is not properly defined.
The reason I'm raising this is because in my app the ads come from the API and one of them wasn't rendering, even though I had not changed anything on my end.
So, I started debugging and I noticed that one of the slots was empty, but Bling was not actually letting me know that the ad could not be rendered.
The change I'm thinking of is just having a prop that's called onError. It'd pass as a parameter an errorType (i.e.: OUT_OF_PAGE_ERROR when isInViewport is false, SLOT_ERROR when the slots are not properly defined) and you can then do whatever you need based on the type of error that took place.
I hope that made sense. Happy to send a pull request if you find it interesting.
Cheers!
The text was updated successfully, but these errors were encountered:
loqtor
changed the title
Callback for _not in viewport_ and such.
Callback for "not in viewport" and such.
Aug 15, 2019
Hey,
More an enhancement than an issue probably, but I think that it'd be nice if the library gave you a way to know when the ad was not rendered because of reasons unrelated to it being empty or the script not being loaded.
The case I'm considering is either when the ad is not in viewport or the slot that matches the current viewport size is not properly defined.
The reason I'm raising this is because in my app the ads come from the API and one of them wasn't rendering, even though I had not changed anything on my end.
So, I started debugging and I noticed that one of the slots was empty, but
Bling
was not actually letting me know that the ad could not be rendered.The change I'm thinking of is just having a
prop
that's calledonError
. It'd pass as a parameter anerrorType
(i.e.:OUT_OF_PAGE_ERROR
whenisInViewport
is false,SLOT_ERROR
when the slots are not properly defined) and you can then do whatever you need based on the type of error that took place.I hope that made sense. Happy to send a pull request if you find it interesting.
Cheers!
The text was updated successfully, but these errors were encountered: