PHPackages                             openbuildings/swiftmailer-google-campaign - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. openbuildings/swiftmailer-google-campaign

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

openbuildings/swiftmailer-google-campaign
=========================================

Append to all email links google campaign parameters

0.3.0(6y ago)3171.7k[1 PRs](https://github.com/OpenBuildings/swiftmailer-google-campaign/pulls)1BSD-3-ClausePHPPHP ^7.1

Since Sep 27Pushed 2y ago10 watchersCompare

[ Source](https://github.com/OpenBuildings/swiftmailer-google-campaign)[ Packagist](https://packagist.org/packages/openbuildings/swiftmailer-google-campaign)[ RSS](/packages/openbuildings-swiftmailer-google-campaign/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (2)Versions (9)Used By (1)

Swiftmailer GoogleCampaign Plugin
=================================

[](#swiftmailer-googlecampaign-plugin)

[![Build Status](https://camo.githubusercontent.com/5893fe1a5ddb187ad93c0197463bf025876c30deda4546eb6da61e7f29c25a2e/68747470733a2f2f7472617669732d63692e6f72672f4f70656e4275696c64696e67732f73776966746d61696c65722d676f6f676c652d63616d706169676e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/OpenBuildings/swiftmailer-google-campaign)[![Code Coverage](https://camo.githubusercontent.com/6db4c99eb6735e3c18458b542225affed6c655ce07e54011b771f56eb548efec/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f70656e4275696c64696e67732f73776966746d61696c65722d676f6f676c652d63616d706169676e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/OpenBuildings/swiftmailer-google-campaign/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a3c2f38bca6dd210093a410add27ef38880d08264bb1ba3b65e31b2240a09c11/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f70656e4275696c64696e67732f73776966746d61696c65722d676f6f676c652d63616d706169676e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/OpenBuildings/swiftmailer-google-campaign/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/9aa51beb767b5315c75b68409b5675fe74ec2581899779acdd9bae8a70f71843/68747470733a2f2f706f7365722e707567782e6f72672f6f70656e6275696c64696e67732f73776966746d61696c65722d676f6f676c652d63616d706169676e2f762f737461626c652e706e67)](https://packagist.org/packages/openbuildings/swiftmailer-google-campaign)

A swiftmailer plugin that appends automatically to all email links google campaign parameters from a config file or a custom one to the links you want

Usage
-----

[](#usage)

```
$mailer = Swift_Mailer::newInstance();

$mailer->registerPLugin(new GoogleCampaignPlugin([
   'utm_source' => 'source',
   'utm_campaign' => 'email',
   'utm_medium' => 'email'
]);
```

Before sending email the plugin will append to all links the campaign parameters:

```

     Example.com

```

Will be converted to

```

     Example.com

```

The plugin supports also embeding additional campaigns to your email:

```
$mailer = Swift_Mailer::newInstance();

$mailer->registerPLugin(
    new GoogleCampaignPlugin(
        [
           'utm_source' => 'source',
           'utm_campaign' => 'email',
           'utm_medium' => 'email'
        ],
        [
            'your_campaign' => [
               'utm_source' => 'my_custom_source',
               'utm_campaign' => 'my_custom_campaign'
            ]
        ]
    )
);
```

To embed a custom campaign to your email simply add the `google_campaign` query parameter to your link with value - the name of your campaign:

```

     Example.com

```

Will output:

```

     Example.com

```

License
-------

[](#license)

Copyright (c) 2013, OpenBuildings Ltd. Developed by Yasen Yanev as part of [clippings.com](http://clippings.com)

Under BSD-3-Clause license, read LICENSE file.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 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 ~466 days

Recently: every ~582 days

Total

6

Last Release

2328d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.3.2

0.2.0PHP &gt;=5.4

0.3.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1153044?v=4)[Yasen Yanev](/maintainers/yanev)[@yanev](https://github.com/yanev)

---

Top Contributors

[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (3 commits)")[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (2 commits)")[![stanstst](https://avatars.githubusercontent.com/u/9391542?v=4)](https://github.com/stanstst "stanstst (1 commits)")[![trayanivanov](https://avatars.githubusercontent.com/u/10871511?v=4)](https://github.com/trayanivanov "trayanivanov (1 commits)")[![yanev](https://avatars.githubusercontent.com/u/1153044?v=4)](https://github.com/yanev "yanev (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/openbuildings-swiftmailer-google-campaign/health.svg)

```
[![Health](https://phpackages.com/badges/openbuildings-swiftmailer-google-campaign/health.svg)](https://phpackages.com/packages/openbuildings-swiftmailer-google-campaign)
```

###  Alternatives

[mattketmo/email-checker

Throwaway email detection library

2752.1M5](/packages/mattketmo-email-checker)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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