# Klaviyo Generic Embed not publishing company\_id in klaviyo.js network script

**URL:** <https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328>\
**Category:** Bugs\
**Tags:** visual-editor\
**Created:** [September 6, 2024, 7:40pm UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328 "2024-09-06T19:40:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtgoodrich](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mtgoodrich](https://forum.builder.io/u/mtgoodrich)\
**Post date:** [September 6, 2024, 7:40pm UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/1 "2024-09-06T19:40:36Z")

</div>

Working on the integration in [builder.io](http://builder.io/) and I have run into an issue.  
Integrating Klaviyo forms using the Generic Embed displays the form properly in the builder preview, however, in our localhost view as well as after publishing, the company\_id value is not being passed to the build config.  
I’ve also added the company id to the Klaviyo plugin settings and have seen no change.

**Builder content link**

> **[Builder.io: Visual Development Platform](https://builder.io/content/ef72c4b20adc4ff996dc13535e4dadab)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually..

**Builder public api key**  
b6235a23441d414d99a1a39a4bf6680d

**Detailed steps to reproduce the bug**  
go to the editor, scroll to the bottom of the page. The Klaviyo form should be visible on the right.

Go to either View current draft or View live page and scroll to the bottom of the page. The form is not visible.

Viewing the Network tab in developer tools, the klaviyo script () is missing the company\_id value. [https://static.klaviyo.com/onsite/js/klaviyo.js?company\_id=QPTKLs](https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=QPTKLs)

(QPTKLs missing on preview, live view and published view)

**Screenshots or video link**

 ![Screenshot 2024-09-06 at 11.16.01 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/8/81dc1b6579df7adf2320c5f8dd76179df9577d72.png)

 ![Screenshot 2024-09-06 at 11.17.06 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/a/ac88d8bdf801a769fdfc13bfc30363641c01a293.png)

 ![Screenshot 2024-09-06 at 11.18.26 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/9/9366cff3b49cabf19bbb315e70fb2686f5e4df51.png)

 ![Screenshot 2024-09-06 at 12.35.54 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/0/0d0ecc53c5affbd004e47429ac46d12a384231b0.png)

**Code stack you are integrating Builder with**  
NextJS, react

**Reproducible code example**  
_If you are having integration errors, please link to codesandbox or copy and paste your problematic code here. The more detail the better!_

---

<div class="post-metadata">

**Author:** ![vicky\_kindra](https://avatars.discourse-cdn.com/v4/letter/v/f17d59/32.png) [@vicky\_kindra](https://forum.builder.io/u/vicky_kindra)\
**Post date:** [September 13, 2024, 9:01pm UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/2 "2024-09-13T21:01:01Z")

</div>

I’m having the same issue here with both the app integration with Klaviyo and using the embed code from Klaviyo - it is showing in the editor/preview but not once published

---

<div class="post-metadata">

**Author:** ![mtgoodrich](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mtgoodrich](https://forum.builder.io/u/mtgoodrich)\
**Post date:** [September 13, 2024, 10:42pm UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/3 "2024-09-13T22:42:37Z")

</div>

I ended up just creating a custom code block to load our Klaviyo forms based on desktop/mobile since we have a separate form for each and wanted to launch our site with forms.

```auto
<!-- Klaviyo Desktop/Mobile Form -->
<div id="klaviyo-form"></div>
<script>
  const isDesktop = window.innerWidth > 991;
  const formDiv = document.createElement('div');
  formDiv.classList.add(`klaviyo-form-${isDesktop ? 'DESKTOP_ID' : 'MOBILE_ID'}`);
  document.getElementById('klaviyo-form').appendChild(formDiv);
</script>
<script async type="text/javascript" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=CUSTOMER_ID"></script>

```

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [September 16, 2024, 8:43am UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/4 "2024-09-16T08:43:44Z")

</div>

Hello @mtgoodrich and @vicky_kindra,

To fix the problem with the Klaviyo generic embed not publishing the company\_id, you can attempt to manually update the company\_id and form\_id. I have created a loom video demonstrating the manual update process, which can be viewed at the following link:

https://www.loom.com/embed/fc41dc01943c4e2a967b54edfaba4072?sid=6be82dc4-f49d-4172-9751-1802a7afa3a2

We hope this helps!

Thanks,

---

<div class="post-metadata">

**Author:** ![vicky\_kindra](https://avatars.discourse-cdn.com/v4/letter/v/f17d59/32.png) [@vicky\_kindra](https://forum.builder.io/u/vicky_kindra)\
**Post date:** [September 16, 2024, 6:34pm UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/5 "2024-09-16T18:34:56Z")

</div>

Hi Manish, thank you for this! It looks good now on desktop but for some reason on mobile it is showing 2 email captures - do you know why?

[https://get.ourkindra.com/5-reasons-to-try-this-vaginal-lotion](https://get.ourkindra.com/5-reasons-to-try-this-vaginal-lotion)

Best,  
Vicky

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [September 17, 2024, 7:35am UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/6 "2024-09-17T07:35:22Z")

</div>

Hello @vicky_kindra,

I reviewed your page. Are 2 emails captured on mobile when submitting the Klaviyo form?

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [September 18, 2024, 10:45am UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/7 "2024-09-18T10:45:56Z")

</div>

Hello @vicky_kindra,

Please let us know if you are still experiencing issues with the Klaviyo embed.

Thank you,

---

<div class="post-metadata">

**Author:** ![vicky\_kindra](https://avatars.discourse-cdn.com/v4/letter/v/f17d59/32.png) [@vicky\_kindra](https://forum.builder.io/u/vicky_kindra)\
**Post date:** [September 20, 2024, 2:13am UTC](https://forum.builder.io/t/klaviyo-generic-embed-not-publishing-company-id-in-klaviyo-js-network-script/6328/8 "2024-09-20T02:13:39Z")

</div>

Hi, sorry I realized it was an issue on my form, you can ignore this. Thank you!
