<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi Ravi,</p>
    <p>This should be farily straightforward.&nbsp; Edit you archive's
      lang/en/templates/default.xml and
      lang/en/templates/default_internal.xml and add the following
      markup in the &lt;head&gt; section of the template, (updating to
      include your UA number):</p>
    <p>&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var _gaq = _gaq || [];<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _gaq.push(['_trackPageview']);<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (function() {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ga = document.createElement('script'); ga.type =
      'text/javascript'; ga.async = true;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ga.src = ('https:' == document.location.protocol ?
      '<a class="moz-txt-link-freetext" href="https://ssl">https://ssl</a>' : '<a class="moz-txt-link-freetext" href="http://www">http://www</a>') + '.google-analytics.com/ga.js';<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(ga, s);<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })();<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>
      &nbsp; &lt;/head&gt;</p>
    <p>Once you have done this you will need to run generate_static as
      you mentioned.&nbsp; Non-static pages should automatically update and
      browse views either will be updated next time generate_views runs
      or their cache expires. You may want to click on the Regenerate
      Views and Regenerate Abstracts buttons on the Admin Page -&gt;
      System Tools menu to make 100% certain all pages are updated to
      include Google Analytics but I don't think this is technically
      necessary.</p>
    <p>Regards</p>
    <p>David Newman<br>
    </p>
    <div class="moz-cite-prefix">On 19/05/2021 12:23, Ravi M via
      Eprints-tech wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:EMEW3|925e2d4ca6321e309b90a5858ab980a4x4ICPa14eprints-tech-bounces|ecs.soton.ac.uk|CANw0mjJ_uMqBqKTk2UHj2jc0QMMTsYpsDBgy_iUrRAyZRrwbug@mail.gmail.com">
      
      <div style="padding-bottom: 10px; padding-top: 5px;">
        <div style="padding:12px; border:1px solid #8D3970;
          background-color:#F7F9FA; color:#8D3970; font-size:14px;
          line-height:22px; font-family: Calibri, Arial, Helvetica,
          sans-serif;">
          <strong>CAUTION:</strong> This e-mail originated outside the
          University of Southampton.
        </div>
      </div>
      <div>
        <div dir="ltr">
          <div>Hello,</div>
          <div><br>
          </div>
          <div>I'd like to add an analytics tracking code on my EPrints
            site. The code is supposed to be added to the &lt;head&gt;
            section of HTML files, but the static pages in EPrints are
            generated via bin/generate_static. I'm not sure how to
            proceed, and I couldn't find anything about this in the
            documentation. Would anyone be able to help?<br>
          </div>
          <div><br>
          </div>
          <div>Best wishes,</div>
          <div>Ravi</div>
          <div><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Faurorepo.in%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce34a0523be7f405e8a5b08d91acbe6bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637570285313723224%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=r1oGYraD4qUowiBspS2B54hianJwBFPeZKQhwBv8D54%3D&amp;reserved=0" originalSrc="https://aurorepo.in/" shash="Gi9RYjGw4Wk0vLpxFjF7nF4IyKufDrBBVneFRVosIta1FAAB/pY6hTtLrcqJ6kShExTTwUqjF31ZUHD8SnhhAwdKpEKxm5tLYyKWHYstXNrGbVu8jW71rxgglVWnjfTddxTGTPVclG4Lz9cs9RmWmaOoMn44L//gWA+yjitA5iY=" originalsrc="https://aurorepo.in/" shash="DgGE4qGCjccerxWYdzbNMVVFVqUMFadmcl4L1aiEpnFUib3MstD6Y7Dw1ob2t/L2smZDpOmflpfqDqT5qOGPbfOAtbUVFya4FFnV5m2i1FRVVUQiixMQb6og6wJ0skM2m91OYcC+9GMrz6zcTuGwAfQxD4TduLjWmgNSph0IoMI=" moz-do-not-send="true">https://aurorepo.in/</a></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce34a0523be7f405e8a5b08d91acbe6bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637570285313723224%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=x5EU6FM9IlFwSPtUeWW1%2BrdZ9%2Brz%2BZTUQRV9kVfSlFA%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="sG8HZ6DnhKrNwJ0cmDyvO+VdvL1Pp2eoKdgL6+fQ9rgIn7deBxXqzn027J/jSiiYQdpXyuSlauS6sjvY1siY1elC69ZN3VYFF7lVrA2jnMMff5kbCQE9ly4ujsy/fid4yw/WLueevXMiXR9fsu8/5PlVlHAJc883PvgizvWDFok=">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce34a0523be7f405e8a5b08d91acbe6bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637570285313733183%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=gvwMlpxLitTWre8kmy7HwTnE9qlOZOPCQ3vrb%2FXp10k%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="uLsIPaVcAMaaT4m3CvPIrgEVes3pb2k2jGOcOXjVFdcjKTujSyoav6ikZjYtf63+2iUVi39R1g1bTtkpJJztg+D9PzkfldaRdgTkgFEgD1aLn8BqcPC427cir2qQHnfDQY7UEQhoCm2dSkSR2lUAqh1FhsRrMpeHFCubsJij9t0=">http://wiki.eprints.org/</a></pre>
    </blockquote>
  <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
        <tr>
        <td style="width: 55px; padding-top: 13px;"><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce34a0523be7f405e8a5b08d91acbe6bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637570285313733183%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2FIPvCBJOrx1An9lomLgjrgY0LhAARHRC%2FpBDZdb5duA%3D&amp;reserved=0" originalSrc="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" shash="ReOpd06aOaP0ZsuEFhdZUDShPfY6fX/o/wJexioZkVC1JkrsH0OtEpkaFQvFNYiO1a4pn1XlkiTVn6KQiDrNbqwv+lk52FzLHdlc/R1C6PS/WChD402SUTWWHifPrpxZZUWfeK3CdewM1rmKOZo5IgK4Vm0vdEGRZQWj5GgzIXo=" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce34a0523be7f405e8a5b08d91acbe6bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637570285313743139%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sv1FK6yzp6aUwV9im%2FZ7vJDJB%2FX%2B9e%2FM%2BTYkSYkMfek%3D&amp;reserved=0" originalSrc="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" shash="IueMYwlk2nDOYyIo3SoqLLeuPpuphLnUNWJ6q4iovIJRfAPMnU67JGttqBtMDyKiP0BcqQ5VfEquCCZRhutNbRrPnxKLDW7Q7CFIvRk8Dd44MQjLcPeaQL0jazc/i+nv/hMghZi8WSA4a3msr4tFZmwfTmA4HHcEIgK+zv9JOmE=" target="_blank" style="color: #4453ea;">www.avg.com</a>
                </td>
        </tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>