<commit_before>// ga.js
// Displays Google Analytics Code
define(['pagelet', 'underscore', 'fs', 'path', 'module', 'conf', 'handlebars', 'fileCache'], function(Pagelet, _, fs, path, module, conf, Handlebars, fileCache) {
    var pagelet = new Pagelet();

    return _.extend(pagelet, {
        moduleUri: module.uri,
        run: function (display) {
            var pageletLayoutPath = path.join(this.dir, this.dirName + conf.get('file.extensions.template'));
            // get the pagelet layout
            fileCache.layouts.get(pageletLayoutPath, function (err, data) {
                if (err) {
                    console.log('Could not read ' + this.dir + ' pagelet.');
                }
                else{
                    var template = Handlebars.compile(data);

                    data = template({
                        gaCode: conf.get('pagelets.ga.code'),
                        domain: conf.get('pagelets.ga.domain')
                    });<commit_msg>Enh: use the new template async-cache from fileCache in ga pagelet.<commit_after>// ga.js
// Displays Google Analytics Code
define(['pagelet', 'underscore', 'fs', 'path', 'module', 'conf', 'fileCache'], function(Pagelet, _, fs, path, module, conf, fileCache) {
    var pagelet = new Pagelet();

    return _.extend(pagelet, {
        moduleUri: module.uri,
        run: function (display) {
            // Get the pagelet layout.
            fileCache.templates.get(this.fullPath, function (err, template) {
                var data;

                if (err) {
                    console.log('Could not read ' + this.dir + ' pagelet.');
                }
                else{
                    data = template({
                        gaCode: conf.get('pagelets.ga.code'),
                        domain: conf.get('pagelets.ga.domain')
                    });
{'fraction_non_alphanumeric': 0.13177874186550975, 'fraction_numerical': 0.0, 'mean_word_length': 1.7496274217585692, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7202699', 'n_tokens_mistral': 508, 'n_tokens_neox': 481, 'n_words': 126}