From ce834332ff1b518bb27dd8660a75bc32b658ade1 Mon Sep 17 00:00:00 2001 From: Job Cespedes Date: Mon, 17 Jul 2017 20:17:16 -0600 Subject: [PATCH] Piwi code injected in head section since amd method was not working. --- classes/api/piwik.php | 2 +- templates/piwik.mustache | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/classes/api/piwik.php b/classes/api/piwik.php index ecd05b6..ebcdc06 100644 --- a/classes/api/piwik.php +++ b/classes/api/piwik.php @@ -56,7 +56,7 @@ public static function insert_tracking() { } if (self::should_track()) { - $OUTPUT->render_from_template('local_analytics/piwik', $template); + $CFG->additionalhtmlhead .= $OUTPUT->render_from_template('local_analytics/piwik', $template); } } } diff --git a/templates/piwik.mustache b/templates/piwik.mustache index ccb55c5..193e42b 100644 --- a/templates/piwik.mustache +++ b/templates/piwik.mustache @@ -32,7 +32,6 @@ Example context (json): { "siteid": UA-90210-15, "addition": 2, } }} - {{#imagetrack}} {{/imagetrack}} - - -{{#js}} + + \ No newline at end of file