# 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:** 1

<div class="post-metadata">

**Author:** ![Justin\_Veenema](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin_veenema/32/61263_2.png) [@Justin\_Veenema](https://meta.discourse.org/u/Justin_Veenema)\
**Post date:** [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/1 "2017-09-14T21:07:48Z")

</div>

Hey all,

So we’re trying to use Unbounce Convertables (which are 100% custom overlays that you can target based on various parameters) to help drive more signups in our Community. Here’s an example:

 ![00 PM](https://global.discourse-cdn.com/meta/original/3X/d/9/d99c6c0b1fa88be8a43538274eed8b42526f721a.png)

The neat thing about Convertables is that I can target based on a few parameters, such as:

- Trigger (arrives on page, on scroll, exit intent, etc.)
- Frequency (only show once, show on each visit, show ever ‘x’ visits, etc.)

We can also do some advanced targeting, such as only showing them to visitors who come from certain traffic sources, or who have certain cookies in their browser.

We are currently trying to target **only visitors who are not logged in** with the call-to-action being for them to [Join our Community](http://community.unbounce.com/signup). We tried to target the default `_t` cookie that gets placed automatically by Discourse, but that cookie uses HTTP and we have some limitations around that.

## So my question is…

I have a simple JS that will embed a cookie into a users browser. I’m trying to figure out how I can run this script **only on login** _(ie. fire to those who sign up or log in)._

```plaintext
<script>
  document.cookie = "logged_in=true; expires=Thu, 18 Dec 2017 12:00:00 UTC";
</script>
```

Any ideas how I could do this?

Thanks! 🙂

---

_[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)._
