Skip to content

Instantly share code, notes, and snippets.

@nickfogle
Created July 21, 2021 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickfogle/8d664531cf02de0b0e888c4affcdbae7 to your computer and use it in GitHub Desktop.
Save nickfogle/8d664531cf02de0b0e888c4affcdbae7 to your computer and use it in GitHub Desktop.
Load 3rd party Churnkey script
export default function loadChurnKey() {
if (!window.churnkey || !window.churnkey.created) {
window.churnkey = { created: true };
const a = document.createElement('script');
a.src = 'https://assets.churnkey.co/js/app.js';
a.async = true;
const b = document.getElementsByTagName('script')[0];
b.parentNode.insertBefore(a, b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment