Skip to content

Instantly share code, notes, and snippets.

View TorbenL's full-sized avatar

Torben Leuschner TorbenL

View GitHub Profile
@TorbenL
TorbenL / track-ajax-form.js
Created June 14, 2013 07:33
tracking conversion of ajax form with google analytics
$(function(){
$("form").on("submit", function(e){
e.preventDefault();
$.post('ajax.php', {
data: $("form").serialize()
}, function(result) {
if(!result.ok)
return false;
@TorbenL
TorbenL / analytics-scroll.html
Created June 14, 2013 06:40
tracking scroll behaviour on single page web design with google analytics
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Single Page Analytics</title>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-XX']);
_gaq.push(['_trackPageview']);
@TorbenL
TorbenL / google-plus-comments.phtml
Last active December 16, 2015 10:19
google+ comments
// static integration (replace [URL])
<iframe width="800" height="600" src="https://plusone.google.com/_/widget/render/comments?bsv&href=[URL]&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&width=750&hl=de">
// wordpress integration
<iframe width="800" height="600" src="https://plusone.google.com/_/widget/render/comments?bsv&href=<?php echo urlencode(get_permalink()); ?>&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&width=750&hl=de">
// fokus cms integration
<iframe width="800" height="600" src="https://plusone.google.com/_/widget/render/comments?bsv&href=<?php echo urlencode($fks->getURL()); ?>&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&width=750&hl=de">