-
Notifications
You must be signed in to change notification settings - Fork 2
/
rakam-snippet.min.js
16 lines (16 loc) · 1.11 KB
/
rakam-snippet.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(function(e,t){var n=e.rakam||{};var r=t.createElement("script")
;r.type="text/javascript";r.async=true
;r.src="https://cdn.rakam.io/sdk/rakam.min.js";r.onload=function(){
e.rakam.runQueuedFunctions()};var a=t.getElementsByTagName("script")[0]
;a.parentNode.insertBefore(r,a);function o(e,t){e[t]=function(){
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}
var s=function(){this._q=[];return this}
;var i=["set","setOnce","increment","unset"];for(var c=0;c<i.length;c++){
o(s.prototype,i[c])}n.User=s;n._q=[]
;var u=["init","logEvent","logInlinedEvent","setUserId","getUserId","getDeviceId","setSuperProperties","setOptOut","setVersionName","setDomain","setUserProperties","setDeviceId","onload","onEvent","startTimer","resetTimer"]
;for(var l=0;l<u.length;l++){o(n,u[l])}
var m=["getTimeOnPreviousPage","getTimeOnPage","isReturningUser"]
;var v=(e.console?e.console.error||e.console.log:null)||function(){}
;var d=function(e){return function(){
v("The method rakam."+e+"() must be called inside rakam.init callback function!")
}};for(l=0;l<m.length;l++){n[m[l]]=d(m[l])}e.rakam=n})(window,document);