title: How to change Page Title with Tag Manager in order to show different title in Analytics?
body: <p>The best solution would be to modify website that is being tracked and change it to generate more valuable Page Titles.</p>
  
  <p>However, that isn't possible and I would like to use breadcrumbs to provide new Page Title for Analytics.</p>
  
  <p>I've created new variable for title in Tag Manager and added a Trigger for it in a Tag.
  And yet the Page Title isn't changing and therefore I ended up wondering should this tag be fired before Analytics tag?</p>
  
  <p>EDIT:</p>
  
  <p>I've now used it with Preview mode and I can see that it is at least trying to set a new value for title. However, the value seems a bit too "unescaped" and I think that there's some hidden characters that cause problems.</p>
  
  <p>EDIT 2:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function() {
  
      var a = jQuery('.breadcrumb_container a');
  
      delete a[0];
  
      var textValues = jQuery(a).map(function() {
  
          return jQuery(this).text();
  
      }).get();     
  
      var str = textValues.join(' &gt; ');    
  
      return str;
  
  }</code></pre>
  </div>
  </div>
  </p>