OSDN Git Service

* Added New Feature.
[modchxj/mod_chxj.git] / src / chxj_chtml40.c
index 03aab33..81b5615 100644 (file)
@@ -24,6 +24,7 @@
 #include "chxj_encoding.h"
 #include "chxj_header_inf.h"
 #include "chxj_conv_z2h.h"
+#include "chxj_google.h"
 
 #define GET_CHTML40(X) ((chtml40_t *)(X))
 #undef W_L
@@ -1175,6 +1176,12 @@ s_chtml40_end_body_tag(void *pdoc, Node *UNUSED(child))
   chtml40 = GET_CHTML40(pdoc);
   doc     = chtml40->doc;
 
+  if (chtml40->conf->use_google_analytics) {
+    char *src = chxj_google_analytics_get_image_url(doc->r);
+    W_L("<img src=\"");
+    W_V(src);
+    W_L("\" />");
+  }
   W_L("</body>");
   if (IS_CSS_ON(chtml40->entryp)) {
     chxj_css_pop_prop_list(chtml40->css_prop_stack);