A JavaScript library for display ads in React applications.
This release supports the use of the Google Interstitial implementation
https://developers.google.com/publisher-tag/samples/display-web-interstitial-ad
Previously, it was only possible to set ad unit paths for out of page slots per slot. You can now omit the ad unit path in the slot definition for out of page slots and the global ad unit path will be used. This is consistent with how it works with regular slots.
See PR #35
Authored by @vonHarry
Bugfix for null pointer error that ocurred in some edge cases (issue #31 / PR #32)
added outOfPage creatives handling, to serve pop-up/pop-under/floating creatives
added new plugin hook "setup" that would be executed during Advertising setup
When the AdvertisingProvider
unmounted when it didn't have a config, a null pointer execption
ocurred. This was fixed.
You can now update the AdvertisingProvider
by re-rendering it with a different configuration prop than before.
When the AdvertisingProvider
receives a new config prop, it will automatically tear down GPT and Prebid and set them up again with the updated configuration, causing all the ad slots in the container to get refreshed with new ads according to the new config.
Thanks Jason Li for implementing this!
Breaking Change
In previous versions, if the config
prop for the AdvertisingProvider
changed, this was ignored,
now it causes GPT and Prebid to be re-initialized and ad slots to be refreshed with the updated config.
While we believe this to be the desired effect, some users may depend on the old “ignorant” behavior, hence we decided to roll out this change as a major release.
You can now render the AdvertisingProvider
without a config prop. This is useful when you
load the ad config asynchronously and don't want to block initial page render.
Thanks Jason Li for implementing this!
Dependency update to fix security issues found by npm audit