# 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:** Support
**Created:** [September 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:** 17
**Page:** 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: [September 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! 🙂

---

<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: [September 15, 2017, 12:15am UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/2 "2017-09-15T00:15:57Z")

</div>

Discourse [already contains this feature](https://meta.discourse.org/t/signup-call-to-action-when-you-read-for-a-while/32228) as of Discourse 1.4, perhaps edit the copy on it to taste?

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/9/19ab297dca8d756589e96f9a407baf00a825c956.jpg)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [September 15, 2017, 1:18am UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/3 "2017-09-15T01:18:00Z")

</div>

There is also [Guest Gate](https://meta.discourse.org/t/guest-gate-sign-up-popup-plugin/56625?source_topic_id=60271)

---

<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: [September 15, 2017, 1:57pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/4 "2017-09-15T13:57:04Z")

</div>

Hey all,

Also tagging @hawk in here because I love her insights.

Thanks for the alternatives, but we’re looking to provide **a strong call to action** to the **right visitors** at the **right time**.

> [@codinghorror](#):
>
> Discourse already contains this feature as of Discourse 1.4, perhaps edit the copy on it to taste?

@codinghorror we’ve been using the feature you referred to, and we’ve been tracking it, and it essentially doesn’t result in any new sign-ups. In our case, we’re trying to convert **lurkers** to become **members** by making our call-to-action hyper relevant based on the content they’re currently viewing.

We’ve built, launched and deployed targeted overlays on every single web property we have at Unbounce, and if they’re targeted properly, and aimed at providing value, [each of them convert way higher](https://unbounce.com/lead-generation/unbounce-overlay-case-study/) than most other traditional method we’ve ever tried\_. We’ve seen [the same results with our customers](https://unbounce.com/conversion-rate-optimization/15-overlay-campaign-ideas/) as well.

### Our Problem

The biggest thing we’re trying to tackle is that we have a pretty sizeable influx in traffic each month, and an abysmally low number of signups. We’re using some advanced analytics from Kissmetrics, and we can see usage patterns from both members and non-members.

If someone registers for an account, we periodically see them coming back because of the **digest emails** and because we subscribe them to certain high-value categories on signup. Those users are also more likely to not only come back, but **like, comment or vote** in the future.

So for us, if we can simply convince more people to sign-up, our re-engagement rates should see a cascading effect as well. Disclaimer: I’m going to go into full-transparency mode here.

#### In August, we saw:

- **17,240** Unique Visitors (actual uniques, not GA uniques)
- **43.9%** were return visitors (they actually return on average more than 3x)
- **25%** were Unbounce customers
- **146** new signups
- **0.86%** CVR

 ![55 AM](https://global.discourse-cdn.com/meta/original/3X/e/5/e59c3956fd4d11e0750045314e41db42956adc92.png)  
 ![44 AM](https://global.discourse-cdn.com/meta/original/3X/e/3/e3bc80745948c6ff1e49836e9339b892fc6b798c.png)  
 ![38 AM](https://global.discourse-cdn.com/meta/original/3X/0/c/0c0615180d13f487adee58811462e165f96644f7.png)

Now before you blame the content, or say that we don’t have enough “reasons for users to sign-up and participate”, know this.

We’ve interviewed some of our **lurkers** _(because like I mentioned about our advanced targeting, we can actually see who they are and whether or not they’re registered customers)._

The general consensus is that **a) they get massive ongoing value out of the community** but **b) didn’t see any reason to sign up**. Most of them aren’t your typical forum users and have never signed up for one in their life. When we told them about some of benefits of actually signing up, they said **“Oh, I had no idea, I didn’t see that anywhere on your site.”**

We work in the conversion space. We understand that the current incentive/benefits aren’t being communicated effectively. We realize that the CTA to sign-up and participate may be weak. If we can communicate the benefits effectively, in a hyper-targeted fashion, we _should_ see our **new signups** and **engagement rates** spike up.

* * *

## EXAMPLES

### 1. Hyper-Targeted Signup CTA

If someone is viewing one of our top 5 high-ranking **Feature Request** topics, we can build an overlay that resonates with their intent (as opposed to just a general “Hey! Join the Community!”). We can then target this overlay accordingly:

1. _Only displays on those 5 posts_ (and)
2. _Only displays to Unbounce Customers_ (and)
3. _Only displays to people who are not logged into the Community_

 ![56 AM](https://global.discourse-cdn.com/meta/original/3X/3/d/3db50e000e7c20f29ad47d23303d114e6463fc87.jpg)

Alternatively, if they are viewing our Tips & Scripts content (which is our highest-traffic content in the Community) the overlay would instead be focused on _their_ intent, and explain why that user in specific would get value from joining our Community.

1. _Only displays on Tips & Scripts content_ (and)
2. _Only displays to Unbounce Customers_ (and)
3. _Only displays to people who are not logged into the Community_

 ![56 AM](https://global.discourse-cdn.com/meta/original/3X/a/9/a926b4cf87defefc9af14d6b307d096687c58890.jpg)

* * *

### 2. Drive Traffic to Specific Content

This is also useful for getting users who _are_ logged into the Community to take action. Let’s say we’re running a poll, or a live Q&A or event in the Community, and we want more participants. We could target an overlay asking people to come participate and funnel that traffic towards the post.

1. _Only people logged in to the Community_ (and)
2. _Only people who haven’t registered for the CRO event site (cookies)_

 ![56 AM](https://global.discourse-cdn.com/meta/original/3X/9/1/91e267bad57418bc81745897e31e4e22c5b88f65.jpg)

* * *

### 3. Promote Events or Local Meetups

With advanced targeting, we can even target based on the users location. So if we’re hosting an event in Vancouver, we can set a general overlay such as:

1. _Only target visitors in Vancouver_
2. _But target all pages, whether logged in or not_

 ![56 AM](https://global.discourse-cdn.com/meta/original/3X/7/3/73835859e0f84ad76c0fab60bb080e871b4566ea.jpg)

* * *

### 4. Non-Intrusive Variations

Not everyone likes overlays. We’re currently in beta for stickybars, which are essentially the same thing (with the same targeting). Like the overlays, we can set these to show once, show every “x” visit, show only to return visitors, etc.

 ![sticky bar](https://global.discourse-cdn.com/meta/original/3X/5/7/576f1c69fc39274c4ec19dddae96d2f477088316.jpg)

* * *

# IN CONCLUSION…

If we can simply drop a **non-HTTP** cookie into users browsers when they log-in / create an account, then we will be able to move forward with this.

It’s exciting, because if we see success the same way we’ve seen success in other areas we’ve used these, then it warrants a full case-study that we’d like to share externally.

So if there’s any way you can help with this, please let me know.

Thanks.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 15, 2017, 2:00pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/5 "2017-09-15T14:00:52Z")

</div>

> [@Justin\_Veenema](#):
>
> Also tagging @hawk in here because I love her insights.

Quick heads up - the team is departing for our week long company retreat to India – the only time we see each other in person all year, as we are a fully remote company – so Hawk will likely not be quick to reply here.

---

<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: [September 15, 2017, 4:29pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/6 "2017-09-15T16:29:29Z")

</div>

Okay. I’d love to hear any solutions that come up here. I think this kind of thing could be useful for _many_ community managers out there.

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [September 15, 2017, 5:45pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/7 "2017-09-15T17:45:39Z")

</div>

Guest Gate can drive guests to registeted members. It improves rhe conversion rate at least 10 fold, in comparison to the default CTA.

The problem was, in my case, that while Guest Gate generated memberships, it did not activate the people to write something. They registeted just to get around the aggressive popup.

---

<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: [September 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>

```

---

<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: [September 15, 2017, 6:41pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/9 "2017-09-15T18:41:31Z")

</div>

Going to try this ASAP @simon. Thanks so much for chiming in here!

---

<div class="post-metadata">

### Author: ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)
#### Post date: [September 15, 2017, 7:39pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/10 "2017-09-15T19:39:59Z")

</div>

> [@ljpp](#):
>
> The problem was, in my case, that while Guest Gate generated memberships, it did not activate the people to write something. They registeted just to get around the aggressive popup.

For this I setup a a zap between discourse \<\> activecampaign and set them up for a sequence of emails to come visit and interact. They get the digest too of course, but this is framed a bit more personally.

---

<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: [September 15, 2017, 7:42pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/11 "2017-09-15T19:42:13Z")

</div>

@SouperC this is super smart. We use Intercom and Hubspot, so I’d like to set up a similar chain. It hasn’t been a huge priority, but it’s in the backlog.

Can you share any details/stats/open rates for this content? Has it attributed to a measurable higher engagement rate?

Very keen to learn more!

---

<div class="post-metadata">

### Author: ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)
#### Post date: [September 15, 2017, 7:44pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/12 "2017-09-15T19:44:24Z")

</div>

> [@Justin\_Veenema](#):
>
> Can you share any details/stats/open rates for this content? Has it attributed to a measurable higher engagement rate?

I can’t because I don’t have any yet 😀 , I just set it up. But I will. I will caution that my niche and community is SUPER nichey.

Are you tracking signups in analytics, because I’m having difficulty doing so :sadpanda:

---

<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: [September 15, 2017, 9:20pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/13 "2017-09-15T21:20:38Z")

</div>

We should chat a bit more. 🙂

I’ll reach out.

---

<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: [September 15, 2017, 9:22pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/14 "2017-09-15T21:22:43Z")

</div>

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

Simon, I owe you a beer my friend. This worked beautifully for us. 🍻

* * *

P.S. I’m a pretty big noob when it comes to cookies. Can I set the cookie to expire in 7 days? I’m sure it’s a simple tweak to the code, correct?

---

<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: [September 15, 2017, 10:01pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/15 "2017-09-15T22:01:02Z")

</div>

> [@Justin\_Veenema](#):
>
> Can I set the cookie to expire in 7 days?

You can set the time based off the current time. Double check this code. You can test it out in your browser’s developer tools to see that it’s working. The math could be simplified.

```plaintext
<script type="text/discourse-plugin" version="0.8">
        if (api.getCurrentUser()) {
        const now = new Date();
        let time = now.getTime();
        time += 60 * 60 * 24 * 7 * 1000; // seconds * minutes * hours * days * milliseconds
        now.setTime(time);
        document.cookie = "logged_in=true; expires=" + now.toUTCString();
    }
</script>

```

---

<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: [September 18, 2017, 1:48am UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/16 "2017-09-18T01:48:36Z")

</div>

@j.jaffeux has expressed some interest in this as a business hosted plugin so we will see!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:44pm UTC](https://meta.discourse.org/t/trying-to-hyper-target-our-lurkers-and-incentivize-sign-ups-and-run-a-js-on-login/70074/17 "2024-06-08T12:44:15Z")

</div>

This topic was automatically closed after 2458 days. New replies are no longer allowed.
