@quadible/web-sdk
Version:
The web sdk for Quadible's behavioral authentication service.
21 lines • 995 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = getPrivateClickMeasurement;
/**
* Checks whether the Safari's Privacy Preserving Ad Measurement setting is on.
* The setting is on when the value is not undefined.
* A.k.a. private click measurement, privacy-preserving ad attribution.
*
* Unfortunately, it doesn't work in mobile Safari.
* Probably, it will start working in mobile Safari or stop working in desktop Safari later.
* We've found no way to detect the setting state in mobile Safari. Help wanted.
*
* @see https://webkit.org/blog/11529/introducing-private-click-measurement-pcm/
* @see https://developer.apple.com/videos/play/wwdc2021/10033
*/
function getPrivateClickMeasurement() {
const link = document.createElement('a');
const sourceId = link.attributionSourceId ?? link.attributionsourceid;
return sourceId === undefined ? undefined : String(sourceId);
}
//# sourceMappingURL=private_click_measurement.js.map