Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@smg-automotive/advertisement-pkg
Advanced tools
Contains Relevant Digital Header Bidding Wrapper for advertisements
Contains Relevant Digital Header Bidding Wrapper for advertisements.
This library is created in an effort to integrate Relevant Digital HB Wrapper. It wraps Relevant HB JavaScript API that includes:
npm install @smg-automotive/advertisement-pkg
The library needs a few configuration variables to work. For that reason, you should wrap your page/top level app component with the <AdProvider/>
context.
import { AdProvider } from "@smg-automotive/advertisement-pkg";
const App = () => {
return (
<AdProvider
relevantDigitalConfigId="123abc"
astCdnUrl="https://acdn.adnxs.com/ast/ast.js"
relevantDigitalCdnUrl="https://relevant-cdn/123abc.js"
>
<AdSlot />
</AdProvider>
)
}
export default App
The AdSlot
component can be used to set two types of placements:
useRelevantDigital
hook is called. When this happens if you have mixed lazy and non-lazy loaded ads on page it will first initiate all non-lazy ones and in following request it will initiate the remaining lazy ones. On leaving the page hook will call destroySlotsuseRelevantDigital
to get invoked, but requires keywords to be set. Can still be used on same page with inactive ads, in that case there is no need to call destroySlots()
as hook will clean them all. If is not used on page with the hook, then it should be set to call destroySlots()
on its own by setting the param destroyOnUnmount
to true
.import { AdSlot, useRelevantDigital } from "@smg-automotive/advertisement-pkg";
const keywords = { page: ['home'], site: ['yoursite.ch'], foo: "bar" };
const BrandPage = () => {
return (
<div>
<AdSlot
adUnitId={1234567}
id="brand-outside-right"
standalone
keywords={keywords}
destroyOnUnmount
/>
</div>
);
}
export default BrandPage;
import { AdSlot, useRelevantDigital } from "@smg-automotive/advertisement-pkg";
const keywords = { page: ['home'], site: ['yoursite.ch'], foo: "bar" };
const HomePage = () => {
useRelevantDigital({ keywords });
return (
<div>
<AdSlot adUnitId={1234567} id="home-top-banner" />
</div>
);
}
export default HomePage;
Is set per placement slot in Relevant Yield dashboard for detailed instructions check here Reloads and Lazy loads in HB Manager
Also covered in Relevant Yield dashboard.
Set URL param:
?debugAdScripts=true
- activate debugging for react-relevant
library together with prebid (pbjs
) and xanrd (apntag
)?ast_test=true
- we need to add when testing mobile web through simulation on a desktop device (else test with actual mobile device)?pbjs_debug=true
- debug only prebid?ast_test=true
- if we suddenly start getting AdBadRequest
on testing environment, we probably got blocked by Xandr, in that case we should add this to URLIs injected automatically with relevant ad-stack. Chances are that is already set, but if not check Overview of setting up HB Analytics Can be customized per-site in Relevant Yield dashboard like: "Publisher accounts" > "SMG" (Edit button) > Tutti (or other site) "Programmatic tag" > expand "Custom Global JavaScript code". More in Adding Custom Dimensions
npm run build
You can link your local npm package to integrate it with any local project:
cd advertisement-pkg
npm run build
cd <project directory>
npm link ../smg-automotive-example-pkg
New versions are released on the ci using semantic-release as soon as you merge into master. Please
make sure your merge commit message adheres to the corresponding conventions and your branch name does not contain forward slashes /
.
FAQs
Contains Relevant Digital Header Bidding Wrapper for advertisements
The npm package @smg-automotive/advertisement-pkg receives a total of 67 weekly downloads. As such, @smg-automotive/advertisement-pkg popularity was classified as not popular.
We found that @smg-automotive/advertisement-pkg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.