# Trying to hyper-target our lurkers and incentivize sign-ups 🚀 (and run a JS on login)

**URL:** <https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074>\
**Category:** Product Support\
**Created:** [Setembro 14, 2017, 9:07pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074 "2017-09-14T21:07:48Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [Setembro 15, 2017, 6:38pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/8 "2017-09-15T18:38:19Z")

</div>

> [@Justin\_Veenema](#):
>
> I’m trying to figure out how I can run this script only on login

Adding this as a `/head` customization seems to work:

```plaintext
<script type="text/discourse-plugin" version="0.8">
        if (api.getCurrentUser()) {
        document.cookie = "logged_in=true; expires=Thu, 18 Dec 2017 12:00:00 UTC";
    }
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074)._
