# Group forum members based on topics viewed?

**URL:** <https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066>\
**Category:** Product Support\
**Created:** [September 26, 2018, 2:28am UTC](https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066 "2018-09-26T02:28:22Z")\
**Posts on this page:** 5\
**Page:** 1

## AI-generated summary

**Grouping Forum Members by Viewed Topics**

Henry_Cooper wants to create targeted email campaigns based on topics viewed by forum members. He aims to group members who viewed specific topics and export their emails to an email marketing campaign. 

[robmc](/t/-/98066/2) suggests using the **Data Explorer** plugin, which can perform this type of analysis. Henry_Cooper is interested in the plugin but lacks knowledge in writing queries. 

[bts](/t/-/98066/4) recommends exploring [useful example queries](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516) to get started and learn how to construct queries.

<div class="post-metadata">

**Author:** ![Henry\_Cooper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/henry_cooper/32/97503_2.png) [@Henry\_Cooper](https://meta.discourse.org/u/Henry_Cooper)\
**Post date:** [September 26, 2018, 2:28am UTC](https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066/1 "2018-09-26T02:28:22Z")

</div>

I am thinking about setting up a re targetting campaign where I will send specific emails to users who viewed specific topics on my forum.

For example someone views a topic about camping tips, I then send them an email where I refer them to a blog on my website about ‘10 tips you must know about camping’

I know that sending emails with discourse is going to be hard, but could I somehow group members based on topics that they have viewed, and then export their emails, and add them to the email marketing campaign?

I know I can just do something similar with facebook re targeting ads (which I will do for sure), but was wondering if this could be a possible alternative.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)\
**Post date:** [September 26, 2018, 10:18am UTC](https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066/2 "2018-09-26T10:18:32Z")

</div>

This is the sort of analysis you can do with [Data Explorer](https://meta.discourse.org/t/32566?silent=true) - do you have this installed?

> [@Discourse Data Explorer](https://meta.discourse.org/t/data-explorer-plugin/32566):
>
> discourse2Summary Discourse [Data Explorer](https://meta.discourse.org/t/32566?silent=true) allows you to make SQL queries against your live database, allowing for up-to-the-minute stats reporting.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.information_source If you’re looking for examples or support for any custom queries, you can find lots of topics in our #data-reporting category under the #sql-query tag. If there’s not one to suit your par…

---

<div class="post-metadata">

**Author:** ![Henry\_Cooper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/henry_cooper/32/97503_2.png) [@Henry\_Cooper](https://meta.discourse.org/u/Henry_Cooper)\
**Post date:** [September 26, 2018, 7:09pm UTC](https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066/3 "2018-09-26T19:09:50Z")

</div>

This seems like the perfect plugin!

the only problem is I don’t know how to make/write queries. Is there any easy way around that, or will I just have to learn?

---

<div class="post-metadata">

**Author:** ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)\
**Post date:** [September 26, 2018, 7:24pm UTC](https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066/4 "2018-09-26T19:24:03Z")

</div>

This topic has a ton of useful example queries. Chances are some may be pretty close to what you’re looking for, and by playing around a bit you’ll start to get a feel for how the queries are constructed:

> [@(Superseded) What cool data explorer queries have you come up with?](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516):
>
> This topic became too long to be easily searched and has been broken down into separate topics. If you have any questions about how to write a [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query, or have one to share, please start a new topic in the #Data & reporting category and tag it with the #sql-query tag. +1information_source For an alternative searchable list of queries that were in this topic, see @SidV’s [query list on GitHub](https://github.com/SidVal/discourse-data-explorer/blob/queries/querys.md).

---

<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:** [October 5, 2022, 6:54pm UTC](https://meta.discourse.org/t/group-forum-members-based-on-topics-viewed/98066/10 "2022-10-05T18:54:49Z")

</div>

Closed on October 5, 2022, 6:54pm UTC


