To add basic event tracking to an element on the page, add this attribute with the appropriate values you'd like to send, separated by pipes |
.
<button data-track="category|action|opt_label|opt_value|opt_noninteraction">
Basic Tracking
</button>
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title><?php echo $page_title; ?></title> | |
</head> | |
<body> | |
<?php echo $content_for_layout; ?> |
createPlaceholders: function() { | |
var noPlaceholderSupport = $('html').hasClass('lte9'); | |
if(noPlaceholderSupport) { | |
var createPlaceholder = function() { | |
var self = this; | |
var $this = $(this); | |
var isEmpty = true; | |
var placeholder = this.placeholder; |
createPlaceholders: function() { | |
var noPlaceholderSupport = $('html').hasClass('lte9'); | |
if(noPlaceholderSupport) { | |
var createPlaceholder = function() { | |
var self = this; | |
var $this = $(this); | |
var isEmpty = true; | |
var placeholder = this.placeholder; |
@media (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 144dpi), | |
(min-resolution: 1.5dppx) { | |
/* Retina rules! */ | |
} |
<script> | |
// Add a script element as a child of the body | |
function downloadJSAtOnload() { | |
var element = document.createElement("script"); | |
element.src = "deferredfunctions.js"; | |
document.body.appendChild(element); | |
} | |
// Check for browser support of event handling capability |
var frames = { | |
init: function() { | |
$(window).on({ | |
'blur': frames.pause, | |
'focus': frames.play | |
}); | |
frames.play(); | |
}, | |
loop: function() { |
var supports_touch = 'ontouchend' in document; | |
var events = { | |
desktop: { | |
start : 'mousedown', | |
stop : 'mouseup', | |
move : 'mousemove', | |
leave : 'mouseleave', | |
resize : 'resize' | |
}, |
<!DOCTYPE html> | |
<!--[if lt IE 7 ]><html class="no-js ie ie6 lte6 lte7 lte8 lte9"><![endif]--> | |
<!--[if IE 7 ]><html class="no-js ie ie7 lte7 lte8 lte9"> <![endif]--> | |
<!--[if IE 8 ]><html class="no-js ie ie8 lte8 lte9"><![endif]--> | |
<!--[if IE 9 ]><html class="no-js ie ie9 lte9"><![endif]--> | |
<!--[if gt IE 9]><!--><html class="no-js"><!--<![endif]--> |