However, one thing I noticed in the difference between the custom theme we paid hubspot to make and the marketplace theme we purchased was the end point. One of our blogs is public and uses the custom theme we paid hubspot to build. The other blog, which we're having issues with, is private/gated and uses the market place theme.
The end point hubspot theme uses is (replace subdomain/domain with your blog domain):
Cloning the theme to a child theme and modifying the search endpoint to the same format as the one hubspot theme uses returns the same JSON response as the normal contentsearch API. It even converts the subdomain/domain combo into &domain= query variable found in the cachekey. More importantly, it works for private content if you're logged in! If you're logged out, it shows the same response as the normal endpoint (no content).
On a pure guess, I'm thinking that the reason the main endpoint doesn't show data is because of a Cross-Origin Resource Sharing (CORS) issue. Aka, the hubspot endpoint domain doesn't not have permissions to access the cookie data in the domain you set up for the blog.
Hope this helps anyone else having this issue. I know I searched for any direction for a few days before stumbling upon this "solution".
However, one thing I noticed in the difference between the custom theme we paid hubspot to make and the marketplace theme we purchased was the end point. One of our blogs is public and uses the custom theme we paid hubspot to build. The other blog, which we're having issues with, is private/gated and uses the market place theme.
The end point hubspot theme uses is (replace subdomain/domain with your blog domain):
Cloning the theme to a child theme and modifying the search endpoint to the same format as the one hubspot theme uses returns the same JSON response as the normal contentsearch API. It even converts the subdomain/domain combo into &domain= query variable found in the cachekey. More importantly, it works for private content if you're logged in! If you're logged out, it shows the same response as the normal endpoint (no content).
On a pure guess, I'm thinking that the reason the main endpoint doesn't show data is because of a Cross-Origin Resource Sharing (CORS) issue. Aka, the hubspot endpoint domain doesn't not have permissions to access the cookie data in the domain you set up for the blog.
Hope this helps anyone else having this issue. I know I searched for any direction for a few days before stumbling upon this "solution".
contentsearch API returning nothing for private/membership blog
SOLVE
@dennisedson@MichaelMa as far as I know, the HubSpot crawler behaves exactly like a Google crawler in that it will only index public pages and also adheres to the robots.txt file.
That would be something you should post to the Ideas board and try to get some upvotes on. Technically it should be possible.
Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success. Don't miss this opportunity to connect and grow—reserve your spot today!