How insert Piwik in HTML code generate by Python (CMS Odoo)

Hello everyone!

I have recently finish my first website with the Odoo CMS which is code in Python.
In the idea I will prefer to use the Piwik tracking than the unconfidentional Google Analytics.

I have already install the Piwik on my server Ubuntu 16.04 but I need to implement this code in Python :

Please give me your integration version with this context :

<t t-name="website.formation">
  <t t-call="website.layout">
    <div id="wrap" class="oe_structure oe_empty">
      <section class="s_text_image mt0 bg-white" style="background-position: 99.69% 99.33%;">
        <div class="container">
          <div class="row">
            <div class="col-md-9 mt0 mb0">
              <h3 style="font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; color: rgb(102, 102, 102); text-align: center;">
                <font style="font-size: 36px;" class="text-epsilon">
                  <b>PREPARATION AMF CERTICATE</b>
                </font>
              </h3>
              <h3 style="text-align: center;">
                <font class="text-epsilon" style="">November 9th 2017 session</font>
              </h3>
              <p style="text-align: right;" class="o_default_snippet_text"/>
              <div style="text-align: left;">
                <br/>
              </div>
            </div>
            <div class="col-md-2 mt0 mb0">
              <h3 style="text-align: right;">
                <a href="http://www.amf-france.org/Actualites/Communiques-de-presse/AMF/annee-2016?docId=workspace%3A%2F%2FSpacesStore%2F55dc7115-a8d4-44cb-be6d-c9add0d40650" data-original-title="" title="">
                  <img class="img img-responsive mb16 pull-left" src="/web/image/954" alt="Odoo text and image block" data-original-title="" title="" style="font-size: 14px;"/>
                  <br/>
                </a>
              </h3>
            </div>
            <div class="col-md-9 mt0 mb0">
              <h3 style="font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; color: rgb(102, 102, 102); text-align: center;">
                <font style="font-size: 36px;" class="text-danger">
                  <b>DOUBLE MASTER II in alternship</b>
                </font>
              </h3>
              <h3 style="text-align: center;">
                <font style="" class="text-danger">
                  <b>Project Management &amp;amp; Finance Management</b>
                </font>
              </h3>
              <p style="text-align: right;" class="o_default_snippet_text"/>
              <div style="text-align: left;"/>
              <div style="text-align: left;">
                <b>
                  <font style="" class="text-danger"><u>Finance </u>: corporate financial strategy, renforcement, provisional cash-flow, structure and debt financement</font>
                </b>
                <b>
                  <font style="" class="text-danger"/>
                </b>
                <b>
                  <font style="" class="text-danger"/>
                </b>
                <b>
                  <font style="" class="text-danger"><u>IT&amp;nbsp;</u>: system administration, information system diagnosis, ERP-CRM functional analysis</font>
                </b>
                <b>
                  <font style="" class="text-danger"/>
                </b>
                <b>
                  <font style="" class="text-danger"><u>Project</u> : "Creativity Challenge" and "Business Situation", PERTH Diagram, change management</font>
                </b>
                <b>
                  <font style="" class="text-danger"/>
                </b>
                <b>
                  <font style="" class="text-danger"/>
                </b>
                <b>
                  <font style="" class="text-danger"><u>Management </u>: competitive avantage strategy, corporate governance</font>
                </b>
              </div>
            </div>
            <div class="col-md-2 mt0 mb64">
              <h3 style="text-align: right;">
                <a href="http://www.ecema.eu/fr" data-original-title="" title="">
                  <img class="img img-responsive mb16 pull-left" src="/web/image/804" alt="Odoo text and image block" data-original-title="" title="" style="font-size: 14px;"/>
                </a>
              </h3>
            </div>
            <div class="col-md-9 mt16 mb0">
              <h3 style="text-align: center;">
                <b>
                  <font style="font-size: 36px;" class="text-gray-dark">MANAGEMENT BACHELOR in alternship</font>
                </b>
              </h3>
              <p style="text-align: right;" class="o_default_snippet_text"/>
              <div style="text-align: left;"/>
              <div style="text-align: left;">
                <b>
                  <font style="" class="text-gray-dark"><u>Finance</u> : provisional budget, price cost, gap analysis</font>
                </b>
                <b>
                  <font style="" class="text-gray-dark"/>
                </b>
                <b>
                  <font style="" class="text-gray-dark"><u>IT</u> : DTP, newsletter B2B &amp;amp; B2C, community management, CSV import/export, websuite builder</font>
                </b>
                <b>
                  <font style="" class="text-gray-dark"/>
                </b>
                <b>
                  <font style="" class="text-gray-dark"><u>Project</u> : Team Workshop, Gantt chart,&amp;nbsp;</font>
                </b>
                <b>
                  <font style="" class="text-gray-dark">requirements specification, framework document</font>
                </b>
                <b>
                  <font style="" class="text-gray-dark"/>
                </b>
                <b>
                  <font style="" class="text-gray-dark"><u>Management </u>: competitive avantage, competitive intelligence, sectoral analysis</font>
                </b>
              </div>
              <p/>
            </div>
            <div class="col-md-2 mt16 mb16">
              <h3 style="text-align: right;">
                <a href="http://www.ecema.eu/fr">
                  <img class="img img-responsive mb16 pull-left" src="/web/image/804" alt="Odoo text and image block" data-original-title="" title="" style="font-size: 14px;"/>
                </a>
                <br/>
              </h3>
            </div>
            <div class="col-md-9 mt0 mb0">
              <h3 style="text-align: center;">
                <b>
                  <font style="font-size: 36px;" class="text-gray">TECHNICAL DEGREE in alternship</font>
                </b>
              </h3>
              <p style="text-align: right;" class="o_default_snippet_text"/>
              <div style="text-align: left;">
                <font color="#efc631" class="text-gray" style="">
                  <b>
                    <u/>
                  </b>
                </font>
                <font color="#efc631" class="text-gray" style="">
                  <b>
                    <u>Accountability</u>
                  </b>
                </font>
                <b>
                  <font style="" class="text-gray"><u>&amp;nbsp;</u>: stock inventory, forecasted financials, break-event point, accoounting entry</font>
                </b>
                <b>
                  <font style="" class="text-gray"/>
                </b>
                <b>
                  <font style="" class="text-gray"><u>Management</u> :&amp;nbsp;</font>
                </b>
                <b>
                  <font style="" class="text-gray">staff planning, Omnès and Paretto concept, BCG's matrix, events<br/></font>
                </b>
              </div>
              <p>&amp;nbsp;</p>
            </div>
            <div class="col-md-2 mt0 mb0">
              <h3 style="text-align: right;"><a href="https://www.jehannedefrance.fr/" data-original-title="" title="">&amp;nbsp;</a>&amp;nbsp;<a href="https://www.jehannedefrance.fr/" data-original-title="" title="">&amp;nbsp;<img class="img img-responsive pull-left mb16" src="/web/image/805" alt="Odoo text and image block" data-original-title="" title="" style="font-size: 14px;"/></a></h3>
            </div>
          </div>
        </div>
      </section>
    </div>
  </t>
</t>

Please, your Piwik tracking’s integration proposition will help me a lot in avoiding a server crash,
Many thanks in advance,

SMaurines

Hi @S.Maurines,

The way you integrate Piwik doesn’t really depend on the backend.

Just find the template which includes the HTML head and insert the tracking code at the end of it (before </head>)

Your are right! With Odoo 10 you have several HTML module. I have found in the weblayout the balise head. I will continue my job in this sens.

Thanks

Its good but sometimes it gets error with the same code. I suggest you to have some modifications for it if possible. Get odoo 10 with multiple HTML modules.