Zack Saadioui
4/17/2025
1
2
3
4
5
6
7
8
html
<script async src="https://www.googletagmanager.com/gtag/js?id=YOUR_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'YOUR_TRACKING_ID');
</script>
1
2
3
4
5
6
7
8
9
10
11
html
<script>
(function(c,l,o,g,e,r){c['Mixpanel']=r;c[r]=function(){
c[r].q=c[r].q||[];c[r].l=1*new Date();
c[r].push(arguments)};c[r].load=function(e){
var t=document.createElement(o);t.type='text/javascript';t.async=!0;
t.src='https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js';
var s=document.getElementsByTagName(o)[0];s.parentNode.insertBefore(t,s);
c[r].init=e};})(window,document,'script','https://www.mixpanel.com','mixpanel');
mixpanel.init("YOUR_TOKEN");
</script>
1
2
3
4
javascript
document.getElementById('myButton').onclick = function() {
mixpanel.track('Button Clicked', {'buttonName': 'My Button'});
};
Copyright © Arsturn 2025