Development Book V17:Manage SEO Options

Search Engine Optimisation (SEO) is the process of improving your webpage or website to increase its visibility and traffic in search engines such as Google. You must have a good SEO in order to increase traffic to your company website. The Odoo platform offers you a variety of SEO-supporting options, which can be set up in the website module's settings menu. Odoo templates, such as web pages, include integrated SEO functionality. Certain templates have several URLs associated with them. For instance, In an online store, product pages are designed using the same templates and different product data. In these situations, distinct SEO settings are needed for every URL. For improved SEO integration, you may enable Google Analytics and the Google Look console under the SEO tab. Your website will now be prepared to display the SEO optimisation option. It may be found under the Optimize SEO option under the Site menu. As seen in the screenshot below, the Site drop-down option at the top will present you with an SEO dialogue.

odoo-development

To carry out the tasks, choose the Optimise SEO option. You may supply the outline and title of the web page. This information is used by the search engines to promote your website. After that, you can give the Keyword. These keywords are the search keys that you simply want to steer to your website. you'll also select a picture for social sharing.

To enable SEO on each record of the model, you will need to inherit the website.seo.metadata mixin in your model. This will enhance your model with several new fields and methods. To store separate data for each record on your module, these fields and methods from the website will be utilised.


    class YourModule(models.Model):
    _name = your.model
    _inherit = ['website.seo.metadata']

    name = fields.Char(string="Name", required=True)
    date = fields.Date(string="Date")
                                 

You can see methods and fields for the SEO mixin inside the website.seo.metadata model in the /addons/website/models/website.py file. The website.layout has all of the SEO-related code, and it retrieves all of the SEO meta-data from the record that is supplied as main_object. The website layout will obtain all the SEO data from the provided record as we pass a record object with the main_object key. If the main_object is not passed from the controller, the template record set is entered because of the main_object, so you receive the same SEO information on every entry.


   http.route('/url/', type='http', auth="user", website=True)
def your_demo_function(self, record):
    return request.render(
        your_model.your_template, {
            record: record,
            'main_object': record
        })

                                 

You may add unique metatags for Twitter and Open Graph sharing in Odoo. After adding the SEO mixin, you can override _default_website_meta() to add your own unique metatags to a page.


 def _default_website_meta(self):
    res = super(YourModel, self)._default_website_meta()
    res['default_opengraph']['og:image'] = self.env['website'].image_url(self, 'image')
    res['default_twitter']['twitter:image'] = self.env['website'].image_url(self, 'image')
    return res
                                 

When you publish the record's URL on social media after that, the record cover will be shown there. Update the module and adjust SEO to point to other record pages. You can modify this by using the Optimise SEO option. You may now handle each record's SEO data independently.

Visitor information

The information about people who visit websites is called visitor information. The website's backend is where the information is kept. Navigate to visitors on the website.

A kanban view of every website visitor is displayed, including their name, status, number of visits, active or inactive, and other details.

odoo-development

Depending on your requirements, you may switch the view between a List view and a Graphical view by using the icon located in the top-right corner. You may use Odoo's filters and group by options to organise and classify your website visits.

If you have the visitor's contact information saved in your system, you may send them an email or SMS.

Simply click on any of those records to view the record.

odoo-development

In this, we can see the visitors' information and visits. The visitors' information form contains basic information about the visitor, such as linked partner, email, language, cell phone and so on. On the visits group, we can see the information about visiting the website like first connection date, last connection, visited pages, visited products, etc.

Additionally, we may obtain data on sites visited, including the number of times the page visited, and product views, including the ability to determine whether the particular person is now connected or not.

whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message