PHPackages                             kunstmaan/seo-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kunstmaan/seo-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

kunstmaan/seo-bundle
====================

Annotating content with metadata for social sharing and seo purposes cannot be overlooked nowadays. The KunstmaanSeoBundle contains default editing functionality for OpenGraph data, meta descriptions, keywords and titles and Metriweb tags. Because the metatagging and tracking options are always changing, a free field to add custom header information is provided as well.

7.3.0(1y ago)24130.0k↓37.7%2[1 issues](https://github.com/Kunstmaan/KunstmaanSeoBundle/issues)2MITPHPPHP ^8.1

Since Jan 9Pushed 3mo ago13 watchersCompare

[ Source](https://github.com/Kunstmaan/KunstmaanSeoBundle)[ Packagist](https://packagist.org/packages/kunstmaan/seo-bundle)[ Docs](https://github.com/Kunstmaan/KunstmaanSeoBundle)[ RSS](/packages/kunstmaan-seo-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (227)Used By (2)

KunstmaanSeoBundle
==================

[](#kunstmaanseobundle)

[![Build Status](https://camo.githubusercontent.com/4a608724c8ae19f814e15b0201c26f40e931c5377618e67a14897a8de7cc054a/68747470733a2f2f7472617669732d63692e6f72672f4b756e73746d61616e2f4b756e73746d61616e53656f42756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/Kunstmaan/KunstmaanSeoBundle)[![Total Downloads](https://camo.githubusercontent.com/e090f10f8a107447165faca223e70498a5a9e65a95aa1e88fb88ca9d4ae8f516/68747470733a2f2f706f7365722e707567782e6f72672f6b756e73746d61616e2f73656f2d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/kunstmaan/seo-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/2c5740e159ba1abbfb63c05c558a799e141d060b549b6549782976db32beb18d/68747470733a2f2f706f7365722e707567782e6f72672f6b756e73746d61616e2f73656f2d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/kunstmaan/seo-bundle)[![Analytics](https://camo.githubusercontent.com/3b5a0106f991d49945542f2622631c3a2046944cc4810f359d8f41f5fe6ccb53/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d333136303733352d372f4b756e73746d61616e2f4b756e73746d61616e53656f42756e646c65)](https://github.com/igrigorik/ga-beacon)

Annotating content with metadata for social sharing and seo purposes cannot be overlooked nowadays. The KunstmaanSeoBundle contains default editing functionality for OpenGraph data, meta descriptions, keywords and titles and Metriweb tags. Because the metatagging and tracking options are always changing, a free field to add custom header information is provided as well.

View more screenshots and information .

Installation
------------

[](#installation)

This bundle is compatible with all Symfony 3.\* releases. More information about installing can be found in this line by line walkthrough of installing Symfony and all our bundles, please refer to the [Getting Started guide](https://kunstmaanbundlescms.readthedocs.io/en/stable/installation/) and enjoy the full blown experience.

Symfony 2.2
-----------

[](#symfony-22)

If you want to use this bundle for a Symfony 2.2 release, use the 2.2 branch.

Usage
-----

[](#usage)

### Metadata

[](#metadata)

In your template define the following to import all SEO metadata. This SEO metadata is set in the SEO tab for your page in the backend.

```
    {% if page is defined %}
        {{ render_seo_metadata_for(page) }}
    {% endif %}
```

For the title there are several options. There are several twig functions which return a title based on which is found first. If they are all null or empty it'll return an empty string.

The `get_title_for` twig function used the following order:

- SEO title
- Page title If nothing is set it'll return an empty string.

Another option is `get_title_for_page_or_default`. This twig function accepts a default string that is used as a fallback.

- SEO title
- default string
- Page title

You can also access the raw SEO object through the `get_seo_for` function.

### Social Widgets

[](#social-widgets)

And finally the SEO bundle is also capable of generating 'social widgets' such as a facebook like button. For now only facebook like &amp; linkedin product are supported.

Use the `get_social_widget_for` function. Example: `get_social_widget_for(page, 'linkedin')`.

You can override the views for all the functions that generate HTML output.

### Google Analytics

[](#google-analytics)

Added to the SEO bundle are a few helpers to control Google Analytics.

These helpers rely on the inclusion of the analytics.js file that's provided in this bundle. The script itself relies on jQuery to be present.

```
    {% javascripts
        'vendor/jquery/jquery.js'
        '@KunstmaanSeoBundle/Resources/public/js/analytics.js'
        output='frontend/footer.js'
    %}

    {% endjavascripts %}
```

First up is `google_analytics_initialize` which looks for the Google Analytics Account ID in your config.

```
    parameters:
        google.analytics.account_id: 'UA-XXXXX-1'
```

You can also optionally pass the `account_id` as an argument to the function.

```
    {{ google_analytics_initialize({'account_id': 'UA-XXXXX-1'}) }}
```

This script will set up a queue with commands (\_gaq) and the Google Analytics script itself (\_ga). When Twig is in debug mode it'll not initialize the script but instead it'll just dump all requests to the console. This way you can easily monitor what Google Analytics is planning on doing in your production environment.

The script will automatically track downloads, external links, links to email addresses &amp; button clicks.

Finally, we've also provided a JavaScript function which you'll have to call manually once the Twitter/Facebook SDK's have been loaded. This will then bind a callback via the SDKs which will log the events.

```
    googleAnalyticsApi.trackSocial('optional pageurl', 'optional trackername')
```

We've also added a helper for e-commerce tracking. You have to set up an `Order` object with its `OrderItem`s and pass it along to the `google_analytics_track_order` twig function. This will output the correctly formatted syntax for Google Analytics.

```
    public function service(ContainerInterface $container, Request $request, RenderContext $renderContext)
    {
        $order = (new Order())
            ->setShippingTotal(5)
            ->setTransactionID('ORD2013-00231');

        $order->orderItems[] = (new OrderItem())
            ->setName('ACME 3000 Starter Kit')
            ->setQuantity(20)
            ->setUnitPrice(13.5)
            ->setTaxes((20 * 13.5) * 0.21)
            ->setCategoryorVariation('World Domination')
            ->setSKU('ACM300-SK');

        $order->orderItems[] = (new OrderItem())
            ->setName('Super Duper Kit')
            ->setQuantity(1)
            ->setUnitPrice(3000)
            ->setTaxes((3000) * 0.21)
            ->setCategoryorVariation('Fun')
            ->setSKU('SDK-3000');

        $renderContext['order'] = $order;
    }
```

```
    {{ google_analytics_track_order(order) }}
```

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance64

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor4

4 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~93 days

Total

224

Last Release

92d ago

Major Versions

5.10.0 → 6.0.12021-11-07

5.10.2 → 6.0.22021-11-22

5.10.5 → 6.0.42022-06-07

5.10.7 → 6.0.62022-09-22

6.4.0 → 7.0.22024-03-24

PHP version history (9 changes)v2.1PHP &gt;=5.3.3

3.1.0PHP &gt;=5.4.0

3.5.0PHP &gt;=5.5.0

5.2.x-devPHP ^7.1

5.7.1PHP ^7.2

5.9.0PHP ^7.2|^8.0

6.2.0PHP ^8.0

7.1.0-alpha1PHP ^8.1

7.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/62ecb43e61751f5fc28256b948ef82f76704338a102d5122b2a6b355e8e972df?d=identicon)[Kunstmaan](/maintainers/Kunstmaan)

---

Top Contributors

[![acrobat](https://avatars.githubusercontent.com/u/1374857?v=4)](https://github.com/acrobat "acrobat (54 commits)")[![krispypen](https://avatars.githubusercontent.com/u/156955?v=4)](https://github.com/krispypen "krispypen (21 commits)")[![denbatte](https://avatars.githubusercontent.com/u/505196?v=4)](https://github.com/denbatte "denbatte (21 commits)")[![SpoBo](https://avatars.githubusercontent.com/u/10668?v=4)](https://github.com/SpoBo "SpoBo (19 commits)")[![Devolicious](https://avatars.githubusercontent.com/u/360302?v=4)](https://github.com/Devolicious "Devolicious (17 commits)")[![sandergo90](https://avatars.githubusercontent.com/u/1516413?v=4)](https://github.com/sandergo90 "sandergo90 (16 commits)")[![dannyvw](https://avatars.githubusercontent.com/u/1218389?v=4)](https://github.com/dannyvw "dannyvw (8 commits)")[![wimvds](https://avatars.githubusercontent.com/u/777114?v=4)](https://github.com/wimvds "wimvds (7 commits)")[![fchris82](https://avatars.githubusercontent.com/u/1598178?v=4)](https://github.com/fchris82 "fchris82 (4 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (4 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (3 commits)")[![daanporon](https://avatars.githubusercontent.com/u/71901?v=4)](https://github.com/daanporon "daanporon (3 commits)")[![KunstmaanLabs](https://avatars.githubusercontent.com/u/8841390?v=4)](https://github.com/KunstmaanLabs "KunstmaanLabs (3 commits)")[![jverdeyen](https://avatars.githubusercontent.com/u/117409?v=4)](https://github.com/jverdeyen "jverdeyen (2 commits)")[![mattiasdelang](https://avatars.githubusercontent.com/u/6680607?v=4)](https://github.com/mattiasdelang "mattiasdelang (1 commits)")[![piszczek](https://avatars.githubusercontent.com/u/9069664?v=4)](https://github.com/piszczek "piszczek (1 commits)")[![deZinc](https://avatars.githubusercontent.com/u/26066867?v=4)](https://github.com/deZinc "deZinc (1 commits)")[![tentwofour](https://avatars.githubusercontent.com/u/4117615?v=4)](https://github.com/tentwofour "tentwofour (1 commits)")[![treeleaf](https://avatars.githubusercontent.com/u/877288?v=4)](https://github.com/treeleaf "treeleaf (1 commits)")[![waaghals](https://avatars.githubusercontent.com/u/458580?v=4)](https://github.com/waaghals "waaghals (1 commits)")

---

Tags

cmskunstmaanseometaopengraph

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kunstmaan-seo-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kunstmaan-seo-bundle/health.svg)](https://phpackages.com/packages/kunstmaan-seo-bundle)
```

###  Alternatives

[vaersaagod/seomate

SEO, mate! It's important.

4341.6k2](/packages/vaersaagod-seomate)[calotype/seo

A package containing SEO helpers.

722.6k](/packages/calotype-seo)[kunstmaan/sitemap-bundle

A sitemap bundle to generate a sitemap for your Kunstmaan bundles website based on its Nodes

10109.8k1](/packages/kunstmaan-sitemap-bundle)[vinicius73/seotools

A package containing SEO helpers.

245.2k](/packages/vinicius73-seotools)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)[kunstmaan/tagging-bundle

Uses FabienPennequin/DoctrineExtensions-Taggable to add tagging to the Kunstmaan bundles

101.4k1](/packages/kunstmaan-tagging-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
