# Matomo Integration

**URL:** <https://discuss.write.as/t/matomo-integration/694>\
**Category:** WriteFreely\
**Created:** [June 25, 2019, 1:59pm UTC](https://discuss.write.as/t/matomo-integration/694 "2019-06-25T13:59:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![robjloranger](https://discuss.write.as/user_avatar/discuss.write.as/robjloranger/32/291_2.png) [@robjloranger](https://discuss.write.as/u/robjloranger)\
**Post date:** [July 3, 2019, 8:24pm UTC](https://discuss.write.as/t/matomo-integration/694/2 "2019-07-03T20:24:33Z")

</div>

hi @g29h9ZjS4Y2d42FmCG9D, if you are running your own instance you can edit the templates directly. Look in the directory `templates/`, you will probably want to add it to the `<head>` of the file `base.tmpl`.

I would suggest creating a new file like `matomo.tmpl`, which will contain the script to be included. It will look something like this:

```handlebars
{{ define "matomo" }}
<!-- matomo script -->
<script type="text/javascript">
// all the script contents here
</script>
<!-- end matomo script -->
{{ end }}

```

then you can include this template in any of the other templates with `{{ template "matomo" }}`.

---

_[View the full topic](https://discuss.write.as/t/matomo-integration/694)._
