Adds basic search engine optimization to the base templates and provides an admin interface for configuring SEO options and Google Universal Analytics.

SEO data

mod_seo adds metadata to your pages to improve your website’s display and ranking in search engine (e.g. Google) results. This metadata includes structured data:

Google uses structured data that it finds on the web to understand the content of the page, as well as to gather information about the web and the world in general.

Following Google’s recommendations, mod_seo adds data in the vocabulary, using the JSON-LD format. This enables search features such as rich results, carousels and the sitelinks searchbox.


If you wish to alter the structured data, you can do so by overriding the schema_org/schema.*.tpl templates. When you do so, make sure to validate your changes with Google’s structured data testing tool.


Disable search engine indexing

To prevent search engines from indexing a page, check the ‘Ask Google not to index this page’ checkbox in the admin. Programmatically, you can set the seo_noindex flag on a resource to do the same.

To disable indexing for the site as a whole, go to Modules > SEO in the Admin (https://yoursite/admin/seo) and tick the ‘Exclude this site from search engines’ checkbox.

Google Analytics

To enable Google Universal Analytics tracking on your Zotonic website, go to http://yoursite/admin/seo in your browser and enter your Google Analytics tracking code.

Zotonic automatically supports the User ID Analytics feature by adding the user ID to the tracking code. You have to enable User ID in your Analytics account first.

Extra parameters

If you wish to add extra Google Analytics parameters, override the _ga_params.tpl file and add the parameters:

    Override this template to provide extra Google Analytics parameters.
    {% if m.acl.user %}
        "userId": "{{ m.acl.user|escapejs }}",
    {% endif %}
    "sessionControl": "start"


Add more documentation