
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@dcard/web-ad-tracking-sdk
Advanced tools
The public advertising tracking SDK for web environments powered by Dcard Inc.
The advertising tracking SDK for web environments powered by Dcard Inc.
pnpm add @dcard/web-ad-tracking-sdk
import entry from '@dcard/web-ad-tracking-sdk';
// Substitute the real client ID for CLIENT_ID issued by Dcard.
entry('init', 'CLIENT_ID');
entry('track', 'PageView', { url: window.location.href });
Copy and paste the following script tags within the <head>
tag of your HTML file to initialize the web tracking SDK.
<script
async
src="https://assets.dcard.tw/scripts/web-ad-tracking-sdk/latest.js"></script>
<script>
/**
* ===[[ Section 1 ]]===
*/
window.dadk =
window.dadk ||
function dadk() {
window.dadk.queue.push(Array.from(arguments));
};
window.dadk.queue = window.dadk.queue || [];
/**
* ===[[ Section 2 ]]===
*
* Change "CLIENT_ID" to your client id
* e.g. "XXXOOO123456"
*/
window.dadk('init', 'CLIENT_ID');
window.dadk('track', 'PageView');
</script>
If you want to use the script with SRI, you can replace the first script with the following:
- <script async src="https://assets.dcard.tw/scripts/web-ad-tracking-sdk/latest.js"></script>
+ <script async src="https://assets.dcard.tw/scripts/web-ad-tracking-sdk/v3.0.0.js" integrity="sha384-OEa0OLZxesMGpNtP3OvBd1dUrOIEFQK0ofDakusy9o7zMeywjDcN/Ujv7gCCILBz" crossorigin="anonymous"></script>
NOTE: The script tag with SRI will fix the version of the SDK, an this may cause the SDK to be outdated. If you want to keep the SDK up-to-date, please use the latest version script tag.
img-src: https://pixel.dcard.tw
script-src: https://pixel.dcard.tw https://assets.dcard.tw/scripts/web-ad-tracking-sdk
img-src: pixel.dcard.tw
script-src: pixel.dcard.tw assets.dcard.tw/scripts/web-ad-tracking-sdk
Revice the Content Security Policy header with nonce attribute:
img-src: https://pixel.dcard.tw
script-src: 'nonce-{SERVER_GENERATED_NONCE}' https://pixel.dcard.tw https://assets.dcard.tw/scripts/web-ad-tracking-sdk
And add the nonce attribute to the script tag:
<script async nonce="SERVER_GENERATED_NONCE" crossorigin="anonymous">
/**
* ===[[ Section 1 ]]===
*/
window.dadk =
window.dadk ||
function dadk() {
window.dadk.queue.push(Array.from(arguments));
};
window.dadk.queue = window.dadk.queue || [];
/**
* ===[[ Section 2 ]]===
*
* Change "CLIENT_ID" to your client id
* e.g. "XXXOOO123456"
*/
window.dadk('init', 'CLIENT_ID');
window.dadk('track', 'PageView');
</script>
FAQs
The public advertising tracking SDK for web environments powered by Dcard Inc.
The npm package @dcard/web-ad-tracking-sdk receives a total of 559 weekly downloads. As such, @dcard/web-ad-tracking-sdk popularity was classified as not popular.
We found that @dcard/web-ad-tracking-sdk 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.