# CTAs not working

**URL:** <https://community.hubspot.com/t/ctas-not-working/103108>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [March 21, 2024, 3:12pm UTC](https://community.hubspot.com/t/ctas-not-working/103108 "2024-03-21T15:12:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaudiaOliveira](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/claudiaoliveira/32/9545_2.png) [@ClaudiaOliveira](https://community.hubspot.com/u/ClaudiaOliveira)\
**Post date:** [March 21, 2024, 3:12pm UTC](https://community.hubspot.com/t/ctas-not-working/103108/1 "2024-03-21T15:12:35Z")

</div>

Hello,

We are experiencing an issue with the HubSpot form using the CTA code. When we try it locally and in other environments, everything works fine, but when we attempt it on the . it only renders a static image of the form. I have noticed that the script for hs-web-interactive is being canceled. Please see the screenshot below for reference.

We also check with Clouflare and it seems that it’s not blocked from their side.  
We are using Nextjs application.

Can anyone help us?

Thank you.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [March 21, 2024, 8:44pm UTC](https://community.hubspot.com/t/ctas-not-working/103108/2 "2024-03-21T20:44:52Z")

</div>

Hi @ClaudiaOliveira,

i could reproduce the error only partialy.  
It seems that something (I assume your cookie script) is blocking the functionality/correct rendering due to a different domain.

![Bildschirmfoto 2024-03-21 um 21.40.59.png](https://d2qpr2jzcazej7.cloudfront.net/optimized/3X/5/f/5f7853f1a932c345082ef679b12c8083006df519_2_690x33.png)

The behavior I could reproduce:

- opening the link will render the form as an image

- waiting for quite some time(5-20s) will load the whole page

- After the whole page is loaded the form works fine

- If the form doesn’t work, a reload and another 5-10s solves the issue

Like mentioned I assume it has to do something with your cookie script

hope that helps

best,

Anton

---

<div class="post-metadata">

**Author:** ![ClaudiaOliveira](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/claudiaoliveira/32/9545_2.png) [@ClaudiaOliveira](https://community.hubspot.com/u/ClaudiaOliveira)\
**Post date:** [March 22, 2024, 11:07am UTC](https://community.hubspot.com/t/ctas-not-working/103108/3 "2024-03-22T11:07:24Z")

</div>

We disable the cookies and the cookies issue it’s not there anymore but the CTA it’s still not working rendering always a static image.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [March 22, 2024, 5:09pm UTC](https://community.hubspot.com/t/ctas-not-working/103108/4 "2024-03-22T17:09:04Z")

</div>

Seems that you’ve secured the page with an SSO/login. So unfortunately nobody from outside your company can access the page anymore.  
Beside that - how did you implement the CTA into your page?

best,

Anton

---

<div class="post-metadata">

**Author:** ![MDichkou](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MDichkou](https://community.hubspot.com/u/MDichkou)\
**Post date:** [March 25, 2024, 12:35pm UTC](https://community.hubspot.com/t/ctas-not-working/103108/5 "2024-03-25T12:35:51Z")

</div>

Hello @Anton , I’m from the Dev team with Claudia. So, related to that issue, I will explain it more to you. I debug it in the browser using some breakpoints, and I saw that sometimes the createViews function from the web-interactive-embed.js file is creating the iframe and it’s removed in the process of creating it. Sometimes it’s not removed, but it’s kept with visibility hidden. (check the screenshot below)

 ![MDichkou_0-1711370144226.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/5/d5b950bf59f95e0d39615750c766a6742a179324.png)

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [March 26, 2024, 1:08pm UTC](https://community.hubspot.com/t/ctas-not-working/103108/6 "2024-03-26T13:08:14Z")

</div>

Hi @MDichkou,

welcome to the Community!  
How did you implement the CTA into your page?

Did you use the default embed-code which looks kinda like this:

```lia-code-sample
<div class="hs-cta-embed hs-cta-simple-placeholder hs-cta-embed-136510361141"
 style="max-width:100%; max-height:100%; width:210px;height:42.390625px" data-hubspot-wrapper-cta-id="136510361141">
 <a href="https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/redirect?encryptedPayload=AVxigLKk2YfvQF5Mjr%2FfbVwqPWM4M%2FleTlbB4u9csJVKADXHvwDXkJt3WXxIVw%2FRtb8uQlfOh50CZ9UCgUOO9gBYl%2F9MfQNjYUBeHjjQBn6Wxw2GtqxE7UOkC9hq6SMSEkQheI%2BS8flnwKzgN%2BbqRHmA9oKe80gnR%2Fqlb9T2uaKV&webInteractiveContentId=136510361141&portalId=5024985" target="_blank" rel="noopener" crossorigin="anonymous">
 <img alt="Add button text" loading="lazy" src="https://no-cache.hubspot.com/cta/default/XXXXXXX/interactive-136510361141.png" style="height: 100%; width: 100%; object-fit: fill"
 onerror="this.style.display='none'" />
 </a>
</div>

```

or have you used some different approach?

best,

Anton

---

<div class="post-metadata">

**Author:** ![MDichkou](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MDichkou](https://community.hubspot.com/u/MDichkou)\
**Post date:** [March 26, 2024, 1:13pm UTC](https://community.hubspot.com/t/ctas-not-working/103108/7 "2024-03-26T13:13:43Z")

</div>

Hi @Anton , thank you for the warm welcome! Yes, I used the default embed code.
