# Custom javascript in WriteFreely 0.81

**URL:** <https://discuss.write.as/t/custom-javascript-in-writefreely-0-81/348>\
**Category:** WriteFreely\
**Created:** [February 5, 2019, 12:31am UTC](https://discuss.write.as/t/custom-javascript-in-writefreely-0-81/348 "2019-02-05T00:31:51Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![infuerno](https://discuss.write.as/user_avatar/discuss.write.as/infuerno/32/1589_2.png) [@infuerno](https://discuss.write.as/u/infuerno)\
**Post date:** [February 6, 2022, 9:00pm UTC](https://discuss.write.as/t/custom-javascript-in-writefreely-0-81/348/14 "2022-02-06T21:00:59Z")

</div>

I managed to sneak my analytics JS code into the end of the Custom CSS box by ending the `</style>` tag, adding the JS and then opening another `<style>` tag.

e.g.

```auto
/* custom CSS */
</style>

<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
	a[h]=a[h]||function(){
		(a[h].q=a[h].q||[]).push(arguments)
	};
	o=f.createElement('script'),
	m=f.getElementsByTagName('script')[0];
	o.async=1; o.src=t; o.id='fathom-script';
	m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.domain.com/tracker.js', 'fathom');
fathom('set', 'siteId', 'ABCDE');
fathom('trackPageview');
</script>
<!-- / Fathom -->

<style type="text/css">
/* closed by the code which injects the custom CSS */

```

---

_[View the full topic](https://discuss.write.as/t/custom-javascript-in-writefreely-0-81/348)._
