<?php // Exit if accessed directly if (!defined('ABSPATH')) { exit; } $domaindata = GADWP_Tools::get_root_domain(esc_html(get_option('siteurl'))); ?> <script type="text/javascript"> (function($){ $(window).load(function() { <?php if ($this->gadwp->config->options['ga_event_tracking']) { ?> //Track Downloads $('a').filter(function() { return this.href.match(/.*\.(<?php echo esc_js($this->gadwp->config->options['ga_event_downloads']); ?> )(\?.*)?$/); }).click(function(e) { ga('send','event', 'download', 'click', this.href<?php if (isset($this->gadwp->config->options['ga_event_bouncerate']) && $this->gadwp->config->options['ga_event_bouncerate']) { echo ", {'nonInteraction': 1}"; } ?> ); });