e70152e44cc66cc599ff6b699eb8adc07f3e656a kent Sat May 24 21:09:34 2014 -0700 Adding Copyright NNNN Regents of the University of California to all files I believe with reasonable certainty were developed under UCSC employ or as part of Genome Browser copyright assignment. diff --git src/hg/lib/googleAnalytics.c src/hg/lib/googleAnalytics.c index 68054f2..ae7e409 100644 --- src/hg/lib/googleAnalytics.c +++ src/hg/lib/googleAnalytics.c @@ -1,34 +1,37 @@ +/* Copyright (C) 2014 The Regents of the University of California + * See README in this or parent directory for licensing information. */ + #include "common.h" #include "hgConfig.h" #include "hPrint.h" #include "googleAnalytics.h" void googleAnalytics() /* check for analytics configuration item and output google hooks if OK */ { static boolean done = FALSE; if (done) return; done = TRUE; /* do not repeat this by mistake */ char *analyticsKey = cfgOption("analyticsKey"); /* if config is missing or empty, nothing happens here */ if (isEmpty(analyticsKey)) return; hPrintf("\n<script type=\"text/javascript\">\n" "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n" "document.write(unescape(\"%%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%%3E%%3C/script%%3E\"));\n" "</script>\n" "<script type=\"text/javascript\">\n" "var pageTracker = _gat._getTracker(\"%s\");\n" "pageTracker._initData();\n" "pageTracker._trackPageview();\n" "</script>\n", analyticsKey); }