# Information about users that will become paying

**URL:** <https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164>\
**Category:** Kibana\
**Created:** [September 28, 2020, 10:02am UTC](https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164 "2020-09-28T10:02:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![boksimon](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@boksimon](https://discuss.elastic.co/u/boksimon)\
**Post date:** [September 28, 2020, 10:02am UTC](https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164/1 "2020-09-28T10:02:42Z")

</div>

Hi,

We are indexing events performed by our users in an effort to create a better service. Each event is indexed into elasticsearch in real time, and we have a couple of dashboards visualizing the common actions. An example of one of these events in elastic could be something like this:

```auto
{
  [...]
  "_source": {
    "indexTime": 1601286327342,
    "eventType": "PAGE_FLIP",
    "userId": "123",
    "userCreatedAt": 1536096932688,
    "userLastTransactionAt": 0,
    "bookId": "abc",
    "pageNumber": 2,
    [...]
  },
  "fields": {
    "daysSinceSignup": [
      12
    ],
    "indexTime": [
      "2020-09-28T09:45:27.342Z"
    ],
    "daysUntilTestPeriodEnds": [
      2
    ],
    "userCreatedAt": [
      "2020-09-08T21:35:32.688Z"
    ],
    "userLastTransactionAt": [
      "1970-01-01T00:00:00.000Z"
    ]
  }
}

```

One of these events is to register a card (i.e. not use only the free version, but start paying us). This is obviously very important for us to track, but I would also like to visualize the the difference in actions leading up to someone starting a subscription.

Do I need to reindex all previous (often \> 1000) events for a user when he/she subscripbes to be able to create visualizations in kibana of this?

Regards,  
Simon

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 28, 2020, 10:17am UTC](https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164/2 "2020-09-28T10:17:54Z")

</div>

You have, what we refer to as, entity centric indexing. Where everything this built around your `userID` field.

The alternate approach is event based, where each action creates a new event and you can then do this sort of reporting based on that.

---

<div class="post-metadata">

**Author:** ![boksimon](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@boksimon](https://discuss.elastic.co/u/boksimon)\
**Post date:** [September 28, 2020, 11:15am UTC](https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164/3 "2020-09-28T11:15:01Z")

</div>

This sounds interesting. We're small enough to change our indexing setup if it makes sense. Do you have any documentation or pointers on how this would work?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 28, 2020, 10:49pm UTC](https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164/4 "2020-09-28T22:49:18Z")

</div>

It's an activity/click stream approach, where each action is logged as an event in Elasticsearch. It's no different to a web/email log in its implementation (if that's easier to imagine).

You can still take that stream and then turn it into an entity centric approach, as additional indices. That way you get the best of both approaches.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 26, 2020, 10:49pm UTC](https://discuss.elastic.co/t/information-about-users-that-will-become-paying/250164/5 "2020-10-26T22:49:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
