PageSourceSearch

http://www.adviceservicescoventry.org.uk/sites/www.adviceservicesc…/google_analytics/downloadtracker.js

js adviceservicescoventry.org.uk collected 2026-10-07 06:33:50 UTC 1,085 bytes, 30 lines download raw bytes

1gaTrackerAttach = function () {
2
3  $('a').click( function() {
4    var trackDownload = Drupal.settings.googleanalytics.trackDownload;
5
6    // Extract the domain from the location (the domain are in domain[2])
7    var domain = /^(http|https):\/\/([a-z-.0-9]+)[\/]{0,1}/i.exec(window.location);
8    // Expression for check internal links
9    var internalLink = new RegExp("^(http|https):\/\/"+domain[2], "i");
10    // Expression for check downloads
11    var isDownload = new RegExp("("+trackDownload+")$", "i");
12
13    if(internalLink.test(this.href)){
14
15      // ... and if the extension are in this.trackDownload ...
16      if(this.trackDownload && isDownload.test(this.href)) {
17        // Clean and track the URL
18        urchinTracker('/download/'+this.href.replace(/^(http|https):\/\/([a-z-.0-9]+)\//i, '').split('/').join('--'));
19      }
20    } else {
21      // are external
22      // Clean and track the URL
23      urchinTracker('/outgoing/'+this.href.replace(/^http:\/\/|https:\/\//i, '').split('/').join('--'));
24    }
25  });
26};
27
28if (Drupal.jsEnabled) {
29 $(document).ready(gaTrackerAttach);
30}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.