Created
April 7, 2022 15:14
-
-
Save dmarman/309c31f0939fd3095cab0e884442ec77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styles from '../styles/Home.module.css' | |
import { useEffect } from 'react'; | |
export default function Home() { | |
useEffect(() => { | |
return () => { | |
if (typeof window !== 'undefined') { | |
(function(t,u,e,m,i,l,io){ | |
t['TuemilioObject']=m;t[m]=t[m]||function(){(t[m].q=t[m].q||[]).push(arguments);}; | |
t[m].id='XXXXXXXXXXXXXXXXXXXXXXXX';l=u.createElement(e),io=u.getElementsByTagName(e)[0]; | |
l.id=m;l.src=i;l.async=1;io.parentNode.insertBefore(l,io); | |
}(window,document,'script','Tuemilio','https://tuemilio.com/assets/js/modal/4.0/tuemilio-modal.js')); | |
Tuemilio('init', { | |
form: { | |
disabled: true | |
}, | |
dashboard: { | |
disabled: true | |
} | |
}); | |
Tuemilio('sendVisit'); | |
Tuemilio('onDashboardData', function (dashboard){ | |
console.log(dashboard) | |
}); | |
} | |
} | |
}, []); | |
function submitForm() { | |
Tuemilio('createSubscriber', { | |
address: '[email protected]', | |
}); | |
} | |
return ( | |
<div className={styles.container}> | |
<div> | |
<button onClick={submitForm}>Send</button> | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment