# Using Piwik For Analytics

**URL:** https://meta.discourse.org/t/using-piwik-for-analytics/24803
**Category:** Support
**Created:** [February 4, 2015, 1:29pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803 "2015-02-04T13:29:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Failcookie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/failcookie/32/115410_2.png) [@Failcookie](https://meta.discourse.org/u/Failcookie)
#### Post date: [February 4, 2015, 1:29pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/1 "2015-02-04T13:29:47Z")

</div>

I know there is support for Google Analytics within the admin panel, but I was curious to see if anyone successfully setup Piwik on their community. Where did you place your code at? Was this spot successful with the dynamic loading content? Should I keep an eye out for certain aspects when adding my code?

I would like to take it a step further and track events with Piwik, but I won’t rush into that just yet. Has anyone trying doing this with any platform?

---

<div class="post-metadata">

### Author: ![tdwells90](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdwells90/32/38160_2.png) [@tdwells90](https://meta.discourse.org/u/tdwells90)
#### Post date: [February 4, 2015, 2:07pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/2 "2015-02-04T14:07:35Z")

</div>

I haven’t used Piwik myself, but you could just add the tracking code by going to admin \> customize \> CSS/HTML \>

Add the tracking code in there and it should work. It looks like piwik uses a tracking code similar to GA so don’t see why that shouldn’t work.

---

<div class="post-metadata">

### Author: ![Failcookie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/failcookie/32/115410_2.png) [@Failcookie](https://meta.discourse.org/u/Failcookie)
#### Post date: [February 4, 2015, 3:25pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/3 "2015-02-04T15:25:31Z")

</div>

Thanks for the confirmation! Which section do you think would be the best for this tracking code? Normally, I would put them above the `</head>`, but I’m not sure if that refreshes enough to catch each page count.

---

<div class="post-metadata">

### Author: ![tdwells90](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdwells90/32/38160_2.png) [@tdwells90](https://meta.discourse.org/u/tdwells90)
#### Post date: [February 4, 2015, 3:31pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/4 "2015-02-04T15:31:19Z")

</div>

The `</head>` area is pretty much the only place it can go. Piwik state it must appear before the `<body>` tag so just dump the code in there and you should be good to go 😄

---

<div class="post-metadata">

### Author: ![Failcookie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/failcookie/32/115410_2.png) [@Failcookie](https://meta.discourse.org/u/Failcookie)
#### Post date: [February 4, 2015, 3:31pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/5 "2015-02-04T15:31:58Z")

</div>

Thanks again for your help!

---

<div class="post-metadata">

### Author: ![tdwells90](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdwells90/32/38160_2.png) [@tdwells90](https://meta.discourse.org/u/tdwells90)
#### Post date: [February 4, 2015, 3:32pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/6 "2015-02-04T15:32:37Z")

</div>

No problem! Just realised Discourse doesn’t like you using html tags in a post, you have to format it 🙂

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 4, 2015, 4:45pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/7 "2015-02-04T16:45:05Z")

</div>

Did you search at all? There is an existing topic on this that covers your question exactly.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 4, 2015, 4:45pm UTC](https://meta.discourse.org/t/using-piwik-for-analytics/24803/8 "2015-02-04T16:45:10Z")

</div>


