Skip to content

Instantly share code, notes, and snippets.

View kanwei's full-sized avatar

Kanwei Li kanwei

  • Double the Donation
  • Atlanta, GA
View GitHub Profile
@kanwei
kanwei / track.php
Last active August 11, 2018 00:28 — forked from jedna/track.js
Track outbound links with Google Universal Analytics.js
add_action( 'wp_footer', 'google_analytics_link_tracking' );
function google_analytics_link_tracking() {
?>
<script type="text/javascript">
function _gaLt(event) {
/* If GA is blocked or not loaded, or not main|middle|touch click then don't track */
if (!ga.hasOwnProperty("loaded") || ga.loaded != true || (event.which != 1 && event.which != 2)) {
return;
}
<script>
//Syracuse University
//Installing DTD tools for main donation form
//https://cusecommunity.syr.edu/s/1632/17/form/landing.aspx?sid=1632&gid=2&pgid=383&sitebuilder=1&contentbuilder=1
//Syracuse public API key
var DDCONF = {API_KEY: "YTQ4NDNhNTktYjIy"};
//loading the dtd script wipes out localstorage, so capture that data early
var dtd_streamlined_search_data = {};