Closed vesper8 closed 7 years ago
oops my bad.. the problem was that I was trying to load an ad that didn't exist and this caused an error for all the ads that did exist
however i would still like to know how you can override the default options?
@vesper8 thanks for your feedback. We understand it's necessary to have a way to override the default option and will implement it in days.
@vesper8 just gave a way for overriding.
Put the props 'options' into <vue-dfp-provider>...</vue-dfp-provider>
like:
<vue-dfp-provider :dfpUnits="dfpUnits" :dfpid="dfpid" section="home" :options="dfpOptions">
...
</vue-dfp-provider>
And the options would be an object like:
{
setTargeting: {},
setCategoryExclusion: '',
setLocation: {},
enableSingleRequest: true,
collapseEmptyDivs: 'original',
companionAds: true,
refreshExisting: true,
disablePublisherConsole: false,
disableInitialLoad: true,
setCentering: false,
noFetch: false,
afterEachAdLoaded: (event) => {},
}
What a pity is this tool doesn't implement all options of DFP_OPTIONS yet at this moment. If any, we could implement them for you.
p.s. remember to do npm install plate-vue-dfp@latest
Hi there!
I'm trying out your package in a Laravel project and I managed to get it to load ads for the first component.
The problem is, unlike in your plate-vue hackernews demo where you load multiple ads in a single request. I am inserting multiple ad components in various parts of my code since my app is mostly using Laravel Blade templates and it isn't a fully vue application at all
On subsequent calls I am getting this error:
I imagine this might be because you have the enableSingleRequest set to true?
I notice that in your vue-plate demo that you have a DFP_OPTIONS set in the constants file but that this constant is never referenced.
It doesn't look like there's a way to override options such as the enableSingleRequest without altering the core package
I would really appreciate if you could help me out here. And it would be very handy to be able to override the default options as well if you could tell me how I can do that.
Many thanks!