# Embedding in Discourse

**URL:** <https://meta.discourse.org/t/embedding-in-discourse/124685>\
**Category:** Product Support\
**Created:** [2 באוגוסט,‏ 2019,‏ 3:07am UTC](https://meta.discourse.org/t/embedding-in-discourse/124685 "2019-08-02T03:07:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Phillip\_Rooney](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phillip_rooney/32/141202_2.png) [@Phillip\_Rooney](https://meta.discourse.org/u/Phillip_Rooney)\
**Post date:** [2 באוגוסט,‏ 2019,‏ 3:07am UTC](https://meta.discourse.org/t/embedding-in-discourse/124685/1 "2019-08-02T03:07:50Z")

</div>

When embedding in discourse I cant for the life of me get it to auto assign to a category.

Im using a vueJs APP which on each standard (subcategory in discourse) I want to display embedded discussion connected to these subcategories.

My embedded code is as follows:

> window.DiscourseEmbed = {  
> discourseUrl: ‘[https://forum.example.example.nz/](https://forum.example.example.nz/)’,  
> discourseEmbedUrl: ‘[https://example.example.example.nz/c/english-level-1/1-1-written-text-study/](https://example.example.example.nz/c/english-level-1/1-1-written-text-study/)’  
> // topicId: 273  
> };
> 
> ```
> (function () {
> const d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
> d.src = `${DiscourseEmbed.discourseUrl}javascripts/embed.js`;
> 
> (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
> }());
> 
> ```

Limitations:  
I understand that using this embedded feature will create a new topic  
I also cant add a category to the “window.DiscourseEmbed” object for auto assigning

But I would love to be able to have the embedded code create this new discussion in my  
(category) english level 1 → (subcategory) standard 1.1.

you can see here:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/b/7b29e3e7ceb47db8c269a4cfcf12de2f4b683d1f.png)

It has a link to the category I wish it to be in. But this topic is sitting in the very top level under _latest_ which is not ideal

I know you can use the host and I have tried to hack around with this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/4/1404bb282610ed5f2b51033349185c8763c279a2.png)

Im not sure if im missing the point or if I am just straight up trying to use this embedded feature for a way more specific use case than what its designed for.

Any help would be appreciated thanks 🙂

---

_[View the full topic](https://meta.discourse.org/t/embedding-in-discourse/124685)._
