PHPackages                             wh/main-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. [Framework](/categories/framework)
4. /
5. wh/main-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

wh/main-bundle
==============

Symfony WHMainBundle

1223HTML

Since Nov 3Pushed 9y ago3 watchersCompare

[ Source](https://github.com/whatson-web/MainBundle)[ Packagist](https://packagist.org/packages/wh/main-bundle)[ RSS](/packages/wh-main-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MainBundle
==========

[](#mainbundle)

Google analytics
----------------

[](#google-analytics)

### Sending a Custom Page View

[](#sending-a-custom-page-view)

```
$this->container()->get('google.analytics')->setCustomPageView('/profile/'.$username);

```

Adding to Page View Queue Note: Page View Queue is always executed before a Custom Page View

```
$this->container()->get('google.analytics')->enqueuePageView('/my-first-page-view-in-queue');
$this->container()->get('google.analytics')->enqueuePageView('/my-second-page-view-in-queue');

```

### Google Adwords

[](#google-adwords)

Application config.yml Enable loading of the Google Adwords service by adding the following to the applications's config.yml file:

```
google:
    adwords:
        conversions:
            account_create:
                id:    111111
                label: accountCreateLabel
                value: 0
            checkout_thanks:
                id:    222222
                label: checkoutThanksLabel
                value: 0

```

Controller

```
$this->get('google.adwords')->activateConversionByKey('account_create');

```

View Include the Google Adwords tracking template like this

```
{% include "GoogleBundle:Adwords:track.html.twig" %}

```

### Google Maps - Static Map

[](#google-maps---static-map)

Application config.yml Enable loading of the Google Maps Static service by adding the following to the applications's config.yml file (The static service does NOT require an API Key):

```
google:
    maps: ~

```

Controller

```
use AntiMattr\GoogleBundle\Maps\StaticMap;
use AntiMattr\GoogleBundle\Maps\Marker;

...

$map = new StaticMap();
$map->setId("Paul");
$map->setSize("512x512");
$marker = new Marker();
$marker->setLatitude(40.596631);
$marker->setLongitude(-73.972359);
$map->addMarker($marker);
$this->container->get('google.maps')->addMap($map);

```

View Include the Google Maps in your template like this:

```
{% if google_maps.hasMaps() %}
    {% for map in google_maps.getMaps() %}
        {% autoescape false %}
            {{ map.render }}
        {% endautoescape %}
    {% endfor %}
{% endif %}

```

### Ecommerce Tracking

[](#ecommerce-tracking)

```
$transaction = new \AntiMattr\GoogleBundle\Analytics\Transaction();
$transaction->setOrderNumber('xxxx');
$transaction->setAffiliation('Store 777');
$transaction->setTotal(100.00);
$transaction->setTax(10.00);
$transaction->setShipping(5.00);
$transaction->setCity("NYC");
$transaction->setState("NY");
$transaction->setCountry("USA");
$this->get('google.analytics')->setTransaction($transaction);

$item = new \AntiMattr\GoogleBundle\Analytics\Item();
$item->setOrderNumber('xxxx');
$item->setSku('zzzz');
$item->setName('Product X');
$item->setCategory('Category A');
$item->setPrice(50.00);
$item->setQuantity(1);
$this->get('google.analytics')->addItem($item);

$item = new \AntiMattr\GoogleBundle\Analytics\Item();
$item->setOrderNumber('bbbb');
$item->setSku('jjjj');
$item->setName('Product Y');
$item->setCategory('Category B');
$item->setPrice(25.00);
$item->setQuantity(2);
$this->get('google.analytics')->addItem($item);

```

Enhanced Ecommerce Tracking Measuring Transactions

```
$transaction = new \AntiMattr\GoogleBundle\Analytics\Transaction();
$transaction->setOrderNumber('xxxx');
$transaction->setAffiliation('Store 777');
$transaction->setRevenue(100.00); // setTotal(100.00);
$transaction->setTax(10.00);
$transaction->setShipping(5.00);
$transaction->setCity("NYC");
$transaction->setState("NY");
$transaction->setCountry("USA");
$this->get('google.analytics')->setTransaction($transaction);

$product = new \AntiMattr\GoogleBundle\Analytics\Item();
$product->setSku('zzzz');
$product->setTitle('Product X');
$product->setAction('purchase');
$product->setBrand('Brand AA');
$product->setCategory('Category A');
$product->setPrice(50.00);
$product->setQuantity(1);
$product->setVariant('Black');
$product->setCoupon('COUPON AAA');
$product->setPosition(1);
$this->get('google.analytics')->addItem($product);

$product = new \AntiMattr\GoogleBundle\Analytics\Item();
$product->setOrderNumber('bbbb');
$product->setSku('jjjj');
$product->setTitle('Product Y');
$product->setAction('purchase');
$product->setBrand('Brand BB');
$product->setCategory('Category B');
$product->setPrice(25.00);
$product->setQuantity(2);
$product->setVariant('Yellow');
$product->setCoupon('COUPON BBB');
$product->setPosition(2);
$this->get('google.analytics')->addItem($product);

```

Measuring Impressions

```
$impression = new \AntiMattr\GoogleBundle\Analytics\Impression();
$impression->setSku('zzzz');
$impression->setTitle('Product X');
$impression->setAction('detail');
$impression->setBrand('Brand AA');
$impression->setCategory('Category A');
$impression->setPrice(50.00);
$impression->setVariant('Black');
$impression->setList('Search Results Page 1');
$impression->setPosition(1);
$this->get('google.analytics')->addImpression($impression);

$impression = new \AntiMattr\GoogleBundle\Analytics\Impression();
$impression->setOrderNumber('bbbb');
$impression->setSku('jjjj');
$impression->setTitle('Product Y');
$impression->setAction('detail');
$impression->setBrand('Brand BB');
$impression->setCategory('Category B');
$impression->setPrice(25.00);
$impression->setVariant('Yellow');
$impression->setList('Search Results Page 2');
$impression->setPosition(2);
$this->get('google.analytics')->addImpression($impression);

```

\#Todo

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9982fe55f4321808fa341e350fbe313c0d89e4e223220a0eef0b581ac192d825?d=identicon)[jeromelebleu](/maintainers/jeromelebleu)

---

Top Contributors

[![jeromelebleu26](https://avatars.githubusercontent.com/u/8663397?v=4)](https://github.com/jeromelebleu26 "jeromelebleu26 (10 commits)")[![jfwhatsonweb](https://avatars.githubusercontent.com/u/17270169?v=4)](https://github.com/jfwhatsonweb "jfwhatsonweb (2 commits)")

### Embed Badge

![Health badge](/badges/wh-main-bundle/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)

PHPackages © 2026

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