# Problem with PIWIK Tracking Code in RapidWeaver 7 (Bug?)

**URL:** <https://forums.realmacsoftware.com/t/problem-with-piwik-tracking-code-in-rapidweaver-7-bug/7488>\
**Category:** RapidWeaver Classic\
**Created:** [June 2, 2016, 8:18am UTC](https://forums.realmacsoftware.com/t/problem-with-piwik-tracking-code-in-rapidweaver-7-bug/7488 "2016-06-02T08:18:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apfelpuree](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/apfelpuree/32/21925_2.png) [@apfelpuree](https://forums.realmacsoftware.com/u/apfelpuree)\
**Post date:** [June 2, 2016, 8:18am UTC](https://forums.realmacsoftware.com/t/problem-with-piwik-tracking-code-in-rapidweaver-7-bug/7488/1 "2016-06-02T08:18:44Z")

</div>

When I used tracking code in RapidWeaver 6 it was written into a special section in General Settings. In the source code the tracking code appeared in the head, but at the **end** of the head, just before the closing head tag.

In RapidWeaver 7 the section for tracking code in the General Settings was removed and it was recommended to write tracking code into _Global Settings \> Code \> Head_. But that might work with Google Analytics Code, but not with PIWIK tracking code.

If you write PIWIK tracking code into _Global Settings \> Code \> Head_ you will cause problems with German umlauts. So you should write PIWIK code into _Global Settings \> Code \> Body_, so the code will be written at the end of the body, just before the closing body tag.

Writing tracking code at the end of the body might be not the appropriate place for all tracking solutions because there is a difference between writing the code into the head or into the body:

If the tracking code is written into the head, it will be loaded before the body and very early, so you can track all visitors, even those who get access to your site but leave them immediately. That generates tracking data that are more exact. For that purpose the place just after the **starting** head tag is the wrong place. It should be written just before the closing **head** tag (as we had in RapidWeaver 6), but in RapidWeaver 7 this is only possible if you edit the index.html in the theme package - so I think there should be a solution in one of the next releases of RapidWeaver 7

But normally it will be completely sufficient to collect tracking data after the body has loaded.

---

<div class="post-metadata">

**Author:** ![MiDoe](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/midoe/32/8803_2.png) [@MiDoe](https://forums.realmacsoftware.com/u/MiDoe)\
**Post date:** [December 29, 2016, 5:25pm UTC](https://forums.realmacsoftware.com/t/problem-with-piwik-tracking-code-in-rapidweaver-7-bug/7488/2 "2016-12-29T17:25:59Z")

</div>

any solution to this?

---

<div class="post-metadata">

**Author:** ![PaulRussam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/paulrussam/32/198_2.png) [@PaulRussam](https://forums.realmacsoftware.com/u/PaulRussam)\
**Post date:** [December 29, 2016, 5:44pm UTC](https://forums.realmacsoftware.com/t/problem-with-piwik-tracking-code-in-rapidweaver-7-bug/7488/3 "2016-12-29T17:44:52Z")

</div>

In the Code section of the Project place it in the Head
