We're rebuilding our HubSpot website and need to get an overview on all the pages that are currently using smart content to make sure that these are taken into account when the new site goes live.
Is there a way of generating a list of page that currently have smart content on our site?
Hi @JKing43, while I'm not aware of a way to get a list of pages that use smart content, I believe there is a workaround for this. It's not elegant and requires coding, but it might be useful to identify the pages that use smart content.
One of the side effects of using smart content is that the page cannot be prerendered.
To know if a page is being prerendered, you can add ?hsDebug=true to the URL, which will add some comments to the HTML of your page, including something like "This page cannot be PRERENDERED".
So what I'm suggesting (and again, it's a "dirty" solution) is to write a script that goes trough all your pages (the list could be taken from the sitemap), fetches the content of those URLs with ?hsDebug=true and checks for the comment/sentence "This page cannot be PRERENDERED" (first check the exact words in that comment). If a page includes that comment, save it to your list of pages that are not being prerendered.
There might be other reasons why a page cannot be prerendered, so the above might include pages without smart content, but at least it will help you narrow down the list of pages and hopefuly will make your go-live process easier.
If you need help writing the script, please feel free to reach out 🙂
I could be wrong, but I am not aware of a way to get a list of all pages using smart content, unfortunately.
I attempted to look at the code of some pages using smart content to see if there was something on the backend that would allow you to search and identify, but I don't think that's possible either.
Josh
Did this post help solve your problem? If so, please mark it as a solution.
Josh Curcio HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers. HubSpot Diamond Partner & HubSpot Certified Trainer