Bug with wixSeo.setMetaTags function

Hi,
When using wixSeo.setMetaTags() today I realized that by setting one tag, I would erase all the other ones that were automatically added by Wix. That’s a shame. I would rather prefer if this function would only update the metaTag I am setting instead of adding only the ones I define and erasing all the others.
Regards,
Fabio

As the API documentation states:

“The meta tags you set overwrite any meta tag information set earlier.”

Feel free to suggest a change in this behavior at the Wishlist Page . Perhaps adding a wixSeo.getMetaTags() function would help.

I passed this on to the development team and they are going to work on this.

Thank you for your feedback.

Hi,
Thanks for passing this on to the dev. team. I really don’t think the current behavior is the best one. I believe that in most cases, the users would like to update a certain tag, and not erase all of them and just add their own. If they want to delete all of them, they would do it explicitly. Since I believe the first option is the one mostly used, I believe the behavior of the " setMetaTags" should be modified to only update the tags.
Maybe another approach would be to create a new method/function called “updateMetaTags” that would update the tag if already exist or create it in case it doesn’t but without removing all the current ones.
FYI, right now this is exactly what I am doing:

  1. Create a copy of the tags with “getMetaTags”.

  2. Update the tag if it exists or add if it doesn’t.

  3. Set them using “setMetaTags”.
    Thanks for the help.