<script src=”https://apis.google.com/js/platform.js”></script>
<script>
function onYtEvent(payload) {
if (payload.eventType == ‘subscribe’) {
// Add code to handle subscribe event.
} else if (payload.eventType == ‘unsubscribe’) {
// Add code to handle unsubscribe event.
}
if (window.console) { // for debugging only
window.console.log(‘YT event: ‘, payload);
}
}
</script>
<div class=”g-ytsubscribe” data-channelid=”UCIihFqzpH1suTX4W7jeL54w” data-layout=”full” data-theme=”dark” data-count=”default” data-onytevent=”onYtEvent”></div>
https://www.youtube.com/channel/UCIihFqzpH1suTX4W7jeL54w