Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@advertol/service-google-dfp
Advanced tools
Google DFP/Ad Manager service.
npm install @advertol/service-google-dfp --save
<!doctype html>
<html>
<head>
<script async="async" src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
window.googletag = window.googletag || {};
window.googletag.cmd = window.googletag.cmd || [];
</script>
</head>
<body>
<div id="zone-becky"></div>
</body>
</html>
import advertol from '@advertol/core';
import GoogleDfpService from '@advertol/service-google-dfp';
const instance = advertol({
// …
service: [
new GoogleDfpService({
zones: [{
id: 'becky',
adUnitPath: '/42/becky',
slot: () => window.googletag.defineSlot('/42/becky', ['fluid'], 'zone-becky').addService(window.googletag.pubads())
}]
})
]
});
instance.resolve();
Type: Object[]
List of zones with their slot callback.
Property | Type | Description |
---|---|---|
slot | Function | Function which returns googletag.defineSlot or googletag.defineOutOfPageSlot instance. |
adUnitPath | string | Full path of the ad unit with the network code and unit code. |
id | string | Zone ID. |
Type: Function
Define additional initialization logic.
Type: Function
Refresh slots.
By default, it calls refresh
method.
Type: Function
Display zone by ID.
By default, it calls display
method.
Type: googletag.Slot[]
List of slots to refresh.
Add new zone with slot callback.
Property | Type | Description |
---|---|---|
slot | Function | Function which returns googletag.defineSlot or googletag.defineOutOfPageSlot instance. |
adUnitPath | string | Full path of the ad unit with the network code and unit code. |
id | string | Zone ID. |
Tested in IE9+ and all modern browsers.
For automated tests, run npm run test:automated
(append :watch
for watcher support).
MIT © Ivan Nikolić
[1.2.0][] - 2023-09-14
FAQs
Google DFP/Ad Manager service.
We found that @advertol/service-google-dfp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.