Last active
December 21, 2015 21:19
-
-
Save codecandies/6367857 to your computer and use it in GitHub Desktop.
click event counting example
This file contains 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
button.onclick = function() { | |
// ga tracking, same on both sites | |
if( window._gaq !== undefined ) { | |
_gaq.push(['_trackEvent', 'liveblogs', 'reload', window.location.href]); | |
} | |
// mobile ivw counting? | |
if( typeof iom !== 'undefined' && typeof iam_data !== 'undefined' ) { | |
// IVW Version 2.0 | |
iom.c(iam_data,1); | |
// cms click counter | |
var ccimg = document.createElement( 'img' ); | |
ccimg.src = 'http://cc.zeit.de/cc.gif?banner-channel=' + iam_data.cp + '&r=' + escape( document.referrer ) + '&rand=' + Math.random()*10000000000000000; | |
} | |
// should be desktop (over accurate) | |
else if ( typeof ZEIT !== 'undefined' ) { | |
ZEIT.clickIVW( true ); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bitte alternative Übertragung wählen, Ajax-Problem bei default mode. Zeile 9:
iom.c(iam_data,1);
(vgl. https://www.infonline.de/downloads/9-1356-748/INFOnline_SZM-Tag_2.0_MEW.pdf )