You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
1.3 KiB
3 lines
1.3 KiB
/*! formstone v0.6.7 [analytics.js] 2015-06-13 | MIT License | formstone.it */
|
|
|
|
!function(a,b){"use strict";function c(){j=b.$body}function d(){return arguments.length&&"object"!==a.type(arguments[0])?g.apply(this,arguments):e.apply(this,arguments),null}function e(b){!k&&j.length&&(k=!0,h=a.extend(h,b||{}),j.on("click.scout","*["+m+"]",f))}function f(b){if("function"===a.type(i.ga)){b.preventDefault();var c=a(this),d=c.attr("href"),e=c.data(l).split(",");for(var f in e)e.hasOwnProperty(f)&&(e[f]=a.trim(e[f]));g(e[0],e[1],e[2]||d,e[3],e[4],c)}}function g(b,c,d,e,f,g){if("function"===a.type(i.ga)){var h={hitType:"event",location:i.location,title:i.document.title};if(b&&(h.eventCategory=b),c&&(h.eventAction=c),d&&(h.eventLabel=d),e&&(h.eventValue=e),f&&(h.nonInteraction=f),"undefined"!==a.type(g)&&!g.attr("data-analytics-stop")){var j="undefined"!==a.type(g[0].href)?g[0].href:"",k=!j.match(/^mailto\:/i)&&!j.match(/^tel\:/i)&&j.indexOf(":")<0?i.location.protocol+"//"+i.location.hostname+"/"+j:j;""!==j&&(g.attr("target")?i.open(k,g.attr("target")):h.hitCallback=function(){document.location=k})}i.ga("send",h)}}var h=(b.Plugin("analytics",{methods:{_setup:c},utilities:{_delegate:d}}),{filetypes:/\.(zip|exe|dmg|pdf|doc.*|xls.*|ppt.*|mp3|txt|rar|wma|mov|avi|wmv|flv|wav)$/i}),i=b.window,j=null,k=!1,l="analytics-event",m="data-"+l}(jQuery,Formstone); |