Conditional to Change SEO/FB Title, Description and Image

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.

5 Likes

Hi @boston85719 :wave: Did you ever work this out?

Just an idea on this

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…

Screen Shot 2022-04-16 at 12.31.43 pm

Josh @ Support Dept
Helping no-code founders get unstuck fast :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

1 Like

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?

1 Like

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?

Screen Shot 2022-04-16 at 12.39.18 pm

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 :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

1 Like

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 :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

1 Like

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.

1 Like

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 :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

1 Like

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 :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

1 Like

Thank you, sir! Really helpful to workshop this. Now, I just have to work out the Javascript bit :joy:

1 Like

Now the fun part begins :grinning_face_with_smiling_eyes:

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. :beers:

5 Likes

Very nicely done! :raised_hands: :raised_hands: :raised_hands:

1 Like

Thanks for circling back on this! :grinning:

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

1 Like