I am trying to make the below code to work but there is some import missing I guess? So how do I import the correct functions from API to use the code? There is no directions of this is API Docs?
let headOptions = {
"title": "A page title",
"description": "A page description",
"keywords": "wix code example",
"noIndex": true,
"metaTags": {
"copyright": "Wix.com",
"Classification": "Example",
"og:title": "The Rock",
"og:image": "http://ia.media-imdb.com/rock.jpg"
}
};
let response.head = headOptions;
HI There
I am trying to edit the SEO Section for my item page , but fields are not connected ?what to do ?
Hi there, I have been trying to add a tracking code into the global header of my site.
It's a <script></script> code.
How do I do this?
I really really like
If the page is not dynamic or router page, you can just add Meta tags in Site SEO settings (this is different from page SEO settings).
1. Go to your Dashboard
2. Select the site
3. Click Manage Site
4. Go to SEO tab
5. Header Code - Meta Tags section allows adding custom Meta tags for the whole site
I hope this resolves your issue. Please, let me know.
Yes I know but how can I add that code to my homepage?
Hi Andreas,
sure, you can add custom meta tags by adding key-value pairs to metaTags.
{ "metaTags": { "apple-mobile-web-app-title": "WIXSweden" } }
Hey
I need to add this on my homepage.
<meta name="apple-mobile-web-app-title" content=”WIXSweden” />
Is this possible?
Hi Andreas,
there are also a few articles that can get you started:
https://support.wix.com/en/article/about-data-binding-router-hooks
https://support.wix.com/en/article/creating-a-data-binding-router-hook
Please let us know if you need any more information or encounter any problems trying to make use of the feature.
Hi Andreas,
For regular pages, you can set the headers using the dialogs for page management - page settings, SEO. It allows you to set title, description, keywords, index flag.
The code above only works for dynamic pages or router pages.
For router pages, as part of the router function.
For dynamic pages, as part of the after router hook. We already set the title for you in dynamic pages (to the title of the item), but using the hook you can take over and customize the behavior.