{"_id":"@absolutejs/attribution","_rev":"2-2a4c3f44718906f80d34dcc1739a6ee8","name":"@absolutejs/attribution","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@absolutejs/attribution","version":"0.1.0","license":"Apache-2.0","_id":"@absolutejs/attribution@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/attribution#readme","bugs":{"url":"https://github.com/absolutejs/attribution/issues"},"dist":{"shasum":"17435cb6086d035b9f0f495c52312974c924be22","tarball":"https://registry.npmjs.org/@absolutejs/attribution/-/attribution-0.1.0.tgz","fileCount":9,"integrity":"sha512-H0QyzsBScdfZpRm1GBEjOPIf5t6LNPpEKCpwRmn48lAFdk4MOoq05jo1POZB4YZLa36TmI+f5KCjSxi54+H3ag==","signatures":[{"sig":"MEYCIQDlFT/oCM/7KLBxx8ldDJL+ENWo6B0RuUOHcvJp+DShoAIhAJbOXQ64GBfONPY5Wzo8Uw1D/yoJHTpL3X37yIelPyjd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41864},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./google-ads":{"types":"./dist/googleAds.d.ts","import":"./dist/googleAds.js","default":"./dist/googleAds.js"}},"gitHead":"8db8a2b5552bfc549ad3e372d880f76b5d0a4707","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/googleAds.ts --outdir dist --root src --sourcemap --target=browser && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run check:package && npm publish --access public","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"repository":{"url":"git+https://github.com/absolutejs/attribution.git","type":"git"},"_npmVersion":"10.9.2","description":"Privacy-aware click attribution, resilient browser measurement, and durable server conversion delivery for AbsoluteJS applications.","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.9.6","@types/bun":"1.3.14","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/attribution_0.1.0_1785739693872_0.23714315327644386","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@absolutejs/attribution","version":"0.2.0","description":"Privacy-aware click attribution, resilient browser measurement, and durable server conversion delivery for AbsoluteJS applications.","repository":{"type":"git","url":"git+https://github.com/absolutejs/attribution.git"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./google-ads":{"types":"./dist/googleAds.d.ts","import":"./dist/googleAds.js","default":"./dist/googleAds.js"}},"license":"Apache-2.0","publishConfig":{"access":"public"},"scripts":{"build":"rm -rf dist && bun build src/index.ts src/googleAds.ts --outdir dist --root src --sourcemap --target=browser && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","test":"bun test","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build","release":"bun run check:package && npm publish --access public"},"devDependencies":{"@types/bun":"1.3.14","prettier":"3.9.6","typescript":"5.9.3"},"_id":"@absolutejs/attribution@0.2.0","gitHead":"4f6a600f0c106ffe3be7af5acda6b57aa638848d","bugs":{"url":"https://github.com/absolutejs/attribution/issues"},"homepage":"https://github.com/absolutejs/attribution#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-6wD3CE1+eQ2ZGgSPAACgifbOtyXwfJubNHNWqsDJ0KN56YeclO/2Q4dTGJx0NNsie6b+HbiwY5pguazVuWPJYQ==","shasum":"2804ea27cdd5f25bcf332ca6e9c72121dbe7d37b","tarball":"https://registry.npmjs.org/@absolutejs/attribution/-/attribution-0.2.0.tgz","fileCount":9,"unpackedSize":55639,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDwmV2qSba89bsTXQzPF7oGgBeIWwquPUBkZngK9DT1MgIgH/s20FsZpa8AnnZvekx473Wffle2ISupJvhLnYHrwQI="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/attribution_0.2.0_1785795792496_0.7448354988010704"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-03T06:48:13.632Z","modified":"2026-08-03T22:23:12.825Z","0.1.0":"2026-08-03T06:48:14.008Z","0.2.0":"2026-08-03T22:23:12.652Z"},"bugs":{"url":"https://github.com/absolutejs/attribution/issues"},"license":"Apache-2.0","homepage":"https://github.com/absolutejs/attribution#readme","repository":{"type":"git","url":"git+https://github.com/absolutejs/attribution.git"},"description":"Privacy-aware click attribution, resilient browser measurement, and durable server conversion delivery for AbsoluteJS applications.","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/attribution\n\nPrivacy-aware attribution primitives for web applications:\n\n- capture `gclid`, `gbraid`, and `wbraid` without persisting full landing URLs;\n- forward identifiers only to explicitly allowlisted owned origins;\n- load the Google tag through a retrying `idle → loading → ready/failed` state\n  machine;\n- keep consent and conversion commands queued while the tag recovers;\n- emit identifier-free, classified load telemetry with lifecycle, consent, CSP,\n  and resource-timing context; and\n- supplement browser tag conversions through Google Data Manager using the same\n  transaction ID for deduplication.\n\n## Browser attribution\n\n```ts\nimport { createAttributionStore } from \"@absolutejs/attribution\";\nimport { createGoogleAdsTag } from \"@absolutejs/attribution/google-ads\";\n\nconst attribution = createAttributionStore();\nattribution.capture();\n\nconst google = createGoogleAdsTag({\n  attribution,\n  consent: {\n    adPersonalization: \"denied\",\n    adStorage: \"denied\",\n    adUserData: \"denied\",\n    analyticsStorage: \"denied\",\n  },\n  id: \"AW-123\",\n  onTelemetry: (event) => console.info(event),\n});\n\n// Start after framework hydration/mount.\ngoogle.start();\n\nconst qualificationUrl = attribution.decorate(\"https://qualify.example.com\", [\n  \"https://qualify.example.com\",\n]);\n```\n\nThe loader waits for the page to be online and visible, applies a bounded\nper-attempt timeout, and spaces retries over a longer window. Terminal telemetry\nclassifies CSP blocks, offline transitions, timeouts, and the browser's otherwise\nopaque network-or-client-blocked failures. Cross-origin response details remain\nrestricted unless the resource opts into Resource Timing access.\n\n## Durable Google conversion supplement\n\n```ts\nimport { sendGoogleAdsDataManagerConversion } from \"@absolutejs/attribution/google-ads\";\n\nawait sendGoogleAdsDataManagerConversion(\n  {\n    accessToken: getGoogleAccessToken,\n    accountId: process.env.GOOGLE_ADS_ACCOUNT_ID!,\n    conversionActionId: process.env.GOOGLE_ADS_CONVERSION_ACTION_ID!,\n  },\n  {\n    consent: { adPersonalization: \"denied\", adUserData: \"denied\" },\n    eventTimestamp: new Date().toISOString(),\n    identifiers: { gclid },\n    transactionId: paymentTransactionId,\n  },\n);\n```\n\nThe package never sends full landing URLs or click identifiers through its\ntelemetry callback. Server delivery requires an explicit access-token provider,\ndestination, consent state, and click identifier.\n","readmeFilename":"README.md"}