You are here: Home
Download Monitor & Manager Plugin
Simple Download Monitor & Manager for WordPress
In case someone needs it, this worked (change event as appropiate):
add_action( 'wp_footer', function () { ?>
<script>
document.addEventListener('click', function(e) {
if (e.target.className == 'sdm_fancy2_download_dl_link')
{
gtag('event', 'descarga', { 'event_category': 'descarga', 'event_action': 'enviar',
'event_label': 'es', 'value': '0'});
}
});
</script>
<?php } );
The add_action( ‘wp_footer’, function () {—–}) adds that code to the footer.
And it is being added correctly. We see the script on the footer of the page.
stackoverflow.com/questions/48707083/wp-footer-not-load-plugin-script-in-wordpress
We are using this code for CF7 and it triggers the sent events.
But we can’t find an event for the download action.
Is there one we can use?
But I hadn’t thought on the onclick button JS. I could use the sdm_fancy2_download_dl_link class.
Thanks, I will try that. And add the code if it works for anyone who needs it.
Start managing and tracking your file downloads with the simple download monitor plugin. Download Now