<commit_before>(function () {
  'use strict';

  moj.Modules.PrintPageButton = {
    init: function() {
      this.initTemplates();
      this.renderButton();
    },

    renderButton: function() {
      var contentArea = $('.confirmation');

      if(!contentArea.length || !this.printButton || !this.printButton.length) {
        return;
      }

      contentArea.append(this.printButton);

      this.printButton.on('click', function() {
        window.print();
      });
    },

    initTemplates: function() {<commit_msg>FE: Send GA event when print page button is clicked<commit_after>(function () {
  'use strict';

  moj.Modules.PrintPageButton = {
    init: function() {
      this.initTemplates();
      this.renderButton();
    },

    renderButton: function() {
      var contentArea = $('.confirmation');

      if(!contentArea.length || !this.printButton || !this.printButton.length) {
        return;
      }

      contentArea.append(this.printButton);

      this.printButton.on('click', function() {
        window.print();
        if(window.ga) {
          window.ga('send', 'event', 'confirmation', 'printed');
        }
      });
    },

    initTemplates: function() {
{'fraction_non_alphanumeric': 0.1570109151973132, 'fraction_numerical': 0.0, 'mean_word_length': 2.537091988130564, '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': '1458264', 'n_tokens_mistral': 356, 'n_tokens_neox': 342, 'n_words': 60}