I am using HubSpot cta buttons on my static website. I simply copy the provided code and paste it directly into our HTML file.
For example, this is the code provided, and I copy and paste exactly as it is: <!--HubSpot Call-to-Action Code --><span class="hs-cta-wrapper" id="hs-cta-wrapper-e7382ac3-802b-48df-bc90-91d87751e433"><span class=" hs-cta-node hs-cta-e7382ac3-802b-48df-bc90-91d87751e433" id="hs-cta-e7382ac3-802b-48df-bc90-91d87751e433"><!--[if lte IE 8]><div id="hs-cta-ie-element"></div><![endif]--><a href="https://cta-redirect.hubspot.com/cta/redirect/4163663/e7382ac3-802b -48df-bc90-91d87751e433" ><img class="hs-cta-img" id="hs-cta-img-e7382ac3-802b-48df-bc90-91d87751e433" style="border-width:0px;" src="https://no-cache.hubspot.com/cta/default/4163663/e7382ac3-802b-48df-bc90-91d87751e433.png" alt="BOOK A DEMO"/></a></span> <script charset="utf-8" src="https://js.hscta.net/cta/current.js"></script><script type="text/javascript"> hbspt.cta.load(4163663 , 'e7382ac3-802b-48df-bc90-91d87751e433', {"useNewLoader":"true","region":"na1"}); </script></span><!-- end HubSpot Call-to-Action Code -->
The buttons work perfectly, but it is generating an error on Google related to the Alternate page with a proper canonical tag.
My website is not hosted in Hubspot, and I am adding the code that the platform gives to me to my HTML file.
All the pages have the correct canonical tags. And what is generating the error is the CODE OF THE BUTTON. When people click on the button, it goes to a different URL, with the code that you use to track, and Google understands that this page is a new one and that we are not using the same canonical tag.