19 lines
598 B
JavaScript
19 lines
598 B
JavaScript
// CommonRoom Analytics
|
|
(function() {
|
|
if (typeof window === 'undefined') return;
|
|
if (typeof window.signals !== 'undefined') return;
|
|
var script = document.createElement('script');
|
|
script.src = 'https://cdn.cr-relay.com/v1/site/af0e3230-e3f4-4e7d-8790-28b56c38d8a9/signals.js';
|
|
script.async = true;
|
|
window.signals = Object.assign(
|
|
[],
|
|
['page', 'identify', 'form'].reduce(function (acc, method){
|
|
acc[method] = function () {
|
|
signals.push([method, arguments]);
|
|
return signals;
|
|
};
|
|
return acc;
|
|
}, {})
|
|
);
|
|
document.head.appendChild(script);
|
|
})(); |