Created
October 28, 2025 14:20
-
-
Save jcupitt/d295c7adb193db5b7186c20be53655e1 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
| <!-- BEGIN Advanced Google Analytics - http://deconf.com/advanced-google-analytics-joomla/ --> | |
| <script type="text/javascript"> | |
| (function($){ | |
| $(window).load(function() { | |
| $('a').filter(function() { | |
| return this.href.match(/.*\.(zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|jpe*g|png|gif|tiff|rar*)(\?.*)?$/); | |
| }).click(function(e) { | |
| ga('send','event', 'download', 'click', this.href); | |
| }); | |
| $('a[href^="mailto"]').click(function(e) { | |
| ga('send','event', 'email', 'send', this.href); | |
| }); | |
| var loc = location.host.split('.'); | |
| while (loc.length > 2) { loc.shift(); } | |
| loc = loc.join('.'); | |
| var localURLs = [ | |
| loc, | |
| 'www.publishingtrainingcentre.co.uk' | |
| ]; | |
| $('a[href^="http"]').filter(function() { | |
| if (!this.href.match(/.*\.(zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|jpe*g|png|gif|tiff|rar*)(\?.*)?$/)){ | |
| for (var i = 0; i < localURLs.length; i++) { | |
| if (this.href.indexOf(localURLs[i]) == -1) return this.href; | |
| } | |
| } | |
| }).click(function(e) { | |
| ga('send','event', 'outbound', 'click', this.href); | |
| }); | |
| }); | |
| })(jQuery); | |
| </script> | |
| <script type="text/javascript"> | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
| ga('create', 'UA-1866447-2', 'auto'); | |
| ga('require', 'displayfeatures'); | |
| ga('set', 'dimension1', 'Stacey Cox'); | |
| ga('set', 'dimension2', 'Uncategorised'); | |
| ga('set', 'dimension3', '2021'); | |
| ga('set', 'dimension4', 'guest'); | |
| ga('send', 'pageview'); | |
| </script> | |
| <!-- END Advanced Google Analytics --> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment