For sections of an app that are one page, such as a blog, it would be nice to have the ability to set a conditional to change the SEO/FB dynamic data on the page.
For example, I have a blog that uses one page to show not only the article, but the category list of articles, an authors list of articles as well as all articles. It is basically a one page app and it would be nice to be able to change the SEO/FB dynamic data so that when the category articles are displayed the SEO/FB data could reflect that.
You can pull dynamic data into these fields from the database. In your table where you store the blogs have fields for the SEO title and descriptions and dynamically pull those in from your database based on a search that references the URL.
An example in my app if I had a whole bunch of pages for a specific type like a blog (in my case itās events, but same same). It would be like thisā¦
Josh @ Support Dept
Helping no-code founders get unstuck fast save hours, & ship faster with an expert on-demand
Thanks, man! Iād previously thought that this solution would work. However, upon testing, it seems that any searches performed in those SEO fields will only run on page load. So, even if I build out the logic so that these searches reference the URL, as youāve suggested, the fields donāt update. At least thatās what Iāve seen in testing. Have you seen otherwise?
So these specific fields only need to work on page load, as their for SEO purposes.
I think what you need is to change the page title in the browser right?
If you use a plugin like Sudsy there is a workflow action where itāll look out for any changes to the URL and rewrite the page title dynamically.
You can also deal with higher level pages like categories or whatever. Well you can set up all those conditionals in workflows as per above using Sudsy as well. I use it on a lot of my projects.
Josh @ Support Dept
Helping no-code founders get unstuck fast save hours, & ship faster with an expert on-demand
To better answer @boston85719 question for dynamically creating SEO/FB titles and subscriptions for category pages if anyone lands here. Youād need to install the toolbox plugin and set some workflows to rewrite those sections manually with javascript when the URL is a category page. I donāt have the script on hand but a google search would surely sort it out
Josh @ Support Dept
Helping no-code founders get unstuck fast save hours, & ship faster with an expert on-demand
Thanks for the quick reply here. Iām actually using Sudsy in my app already. (Itās awesome.) I think I might not have explained my problem very clearly. One of the primary reasons Iām using Sudsy is to avoid reloading the page each time a user navigates to a new internal URL. The challenge this creates, of course, is that the SEO meta tags arenāt refreshed using this method. Therefore, I would assume that any bots crawling through my site and indexing the content would just continue to see the meta tags for whatever page they first landed on (the home page, presumably). Thatās the challenge I was hoping to solve. Iāve been exploring using custom Javascript to change these tags before updating the URL. That said, Iām new to JS so itās been a slog, and I havenāt yet worked it out.
Right, this makes sense. So I think youād need to go down the route of javascript to solve that issue, in theory.
However, if I had to put money on it Iād expect that while the custom js will rewrite those fields, itāll happen too late and the bots will have already picked up the previous data. So youāre back to square one.
The way to perhaps get around this would be to switch off the auto-generated sitemap in Bubble, and generate your own that has all of the URLs you want indexed and upload this to the search console. Then itās probably more likely for the bots to hit that list of URLs and therefore load each URL as if itās a different page then it trying to crawl through the site itself. Then you donāt have to worry about rewriting those fields on the fly.
Itās not an exact science and ultimately the bots will do as they please. But itās probably got a decent chance of working as itās easier for them to do it that way anyway. If it doesnāt work and they crawl your site using the sitemap and then crawl it manually and overwrite everything then you could look at injecting some custom code to mark those internal links to nofollow and increase your chances that theyāll just use the sitemap (they do whatever the $%^& they like anyway haha). Iām not an SEO expert, but I think that then opens another can of worms though.
Josh @ Support Dept
Helping no-code founders get unstuck fast save hours, & ship faster with an expert on-demand
This makes sense. Thank you. One other quick thought, if you have time to give your take: My working hypothesis has been that updating the meta tags via JS PRIOR to navigating to a new URL via Sudsy (as well as on initial page load) might be the best approach. In that case, you wouldnāt have to worry about the bots beating you to the punch since they wouldnāt recognize that the page had changed until after the tags had already been swapped. Thoughts?
Itās a good call, that didnāt cross my mind. Itās not a particularly taxing js function so it should happen quickly. So I guess you could feed in the parameters you use to rewrite the URL to the js function first and then rewrite the URL. Worth a shot, absolutely!
I guess my advice would always be to get your full sitemap into Google console regardless though. Thereās a far higher chance of getting all your pages indexed quickly that way vs. Google manually crawling dynamically generated pages. In my (limited) experience on these sorts of things it usually gives up at some point if you have a lot of pages and it needs to go down all of these different branches. Itāll do it eventually Iām sure, but probably not as fast as you like. But I guess would also be influenced on the traffic & overall domain ranking etc
Josh @ Support Dept
Helping no-code founders get unstuck fast save hours, & ship faster with an expert on-demand
Wanted to provide a quick update on this, for those who might find this thread in the future:
Upon further research and testing, I discovered that Bubble does not reload the entire page when navigating to a different record on the same typed page, though it will retrieve dynamic SEO meta tags associated with the underlying record. Whatās more, it seems that Bubble will retrieve this record each time the URL changes regardless of whether one is navigating to the new record via a workflow or a native Bubble link.
With this in mind, Iāve created a āhelperā data type for āpages,ā which has fields for custom SEO meta, as well as the full URL path as the slug. Iāve then bound my root page (where the Sudsy element lives) to this data type. This allows me to use @sudsy link elements for all internal navigation (building links dynamically by reference to the target āpageā), avoid reloads and draw in dynamic metadata for each record, regardless of the associated custom data type ā all without fiddling with custom JS.
I manipulate the UI and load the associated custom records via Sudsy, by reference to the URL parameters, and I keep my page metadata up to date across custom types via a āpageā field on the associated records, combined with database triggers.
Shoutout to @chris.williamson1996, whose musings on the below thread sent me down this path.
Yesā¦I just put a dynamic expression into the SEO inputs on the page that uses the :formatted as text operator so that I can have it change dynamicallyā¦Iāve done this on an events listing site, when it was essential to get the different structured data to load in the page based on if the event is online or in person as the structured data for those two are different.
Formatted as text operator provides two results (yes/no) in which both have an input that you can add dataā¦you can take it and step further down, but the further along you go the more time it takes to evaluate, so I donāt go any more than two steps down