# \[paid\] Preference to create & embed a topic via JavaScript only when a user clicks the "Start Discussion" link

**URL:** https://meta.discourse.org/t/paid-preference-to-create-embed-a-topic-via-javascript-only-when-a-user-clicks-the-start-discussion-link/78593
**Category:** Marketplace
**Tags:** embedding
**Created:** [January 21, 2018, 4:48pm UTC](https://meta.discourse.org/t/paid-preference-to-create-embed-a-topic-via-javascript-only-when-a-user-clicks-the-start-discussion-link/78593 "2018-01-21T16:48:29Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [January 22, 2018, 10:19pm UTC](https://meta.discourse.org/t/paid-preference-to-create-embed-a-topic-via-javascript-only-when-a-user-clicks-the-start-discussion-link/78593/4 "2018-01-22T22:19:13Z")

</div>

My sense is that a PR would be the better route here. But let me pose the concept as I understand it:

1. This would create a new `/comments` route that [requires two parameters](https://meta.discourse.org/t/embedding-but-dont-automatically-create-a-topic-until-a-user-chooses-to-comment/61450/31): `url` and `user-click`. This URL would be used under the “Start Discussion” link.
2. The `user-click` parameter would be appended by javascript when clicked to stop crawlers from triggering it.
3. If a topic already exists for the embed url passed as a parameter, then the user is redirected to that topic.
4. If the topic does not exist, the topic is created as per usual.

My biggest question is around settings. Is this intended to be the default way this should work or is this a setting enabled in the embed setup? We may need someone from the team to answer that one. Especially if this is to be a PR.

---

_[View the full topic](https://meta.discourse.org/t/paid-preference-to-create-embed-a-topic-via-javascript-only-when-a-user-clicks-the-start-discussion-link/78593)._
