PHPackages                             tractorcow/silverstripe-campaignmonitor - 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. [API Development](/categories/api)
4. /
5. tractorcow/silverstripe-campaignmonitor

ActiveSilverstripe-vendormodule[API Development](/categories/api)

tractorcow/silverstripe-campaignmonitor
=======================================

Simple implementation of the campaign monitor API within Silverstripe

6.0.0(2mo ago)619.8k↑50%12PHP

Since Mar 15Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/tractorcow/silverstripe-campaignmonitor)[ Packagist](https://packagist.org/packages/tractorcow/silverstripe-campaignmonitor)[ RSS](/packages/tractorcow-silverstripe-campaignmonitor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

Campaign monitor wrapper module for Silverstripe
================================================

[](#campaign-monitor-wrapper-module-for-silverstripe)

Simple implementation of the campaign monitor API within Silverstripe

Credits and Authors
-------------------

[](#credits-and-authors)

- Damian Mooyman -

License
-------

[](#license)

- TODO

Requirements
------------

[](#requirements)

- SilverStripe CMS
- A Campaign Monitor account with an API key

Installation instructions
-------------------------

[](#installation-instructions)

```
composer require tractorcow/silverstripe-campaignmonitor
```

Examples
--------

[](#examples)

### Using the API to set a destination list (SiteConfig extension)

[](#using-the-api-to-set-a-destination-list-siteconfig-extension)

Given a hard coded API key, allow the user to select a client from their account, and subsequently a list.

```
	function updateCMSFields(FieldList $fields) {

		// Load base object
		$resources = CMResources::create("my api key");

		// Get clients under our account
		$clients = $resources->Clients()->map();
		$fields->addFieldToTab(
			'Root.CampaignMonitor',
			DropdownField::create('Client', 'Client', $clients)
		);

		// check if client is available to select
		if($this->owner->Client && ($client = $resources->getClient($this->owner->Client))) {
			$lists = $client->Lists()->map();
			$fields->addFieldToTab(
				'Root.CampaignMonitor',
				DropdownField::create('DefaultList', 'Default List', $lists)
			);
		}
	}
```

### Saving a subscriber

[](#saving-a-subscriber)

Handling subscription details from a form submission

```
	public function subscribe($data, $form)
	{
		$listID = SiteConfig::current_site_config()->DefaultList;
		$resources = CMResources::create("my api key");
		if($resources && $listID && $list = $resources->getList($listID)) {
			$this->addUserToList($data, $list);
			Director::redirect($this->Link('thanks'));
		}
		// Error handling here
	}

	protected function addUserToList($data, $list)
	{
		if(empty($list)) return;

		// Create subscriber
		$fields = [
			'EmailAddress' => $data['Email'],
			'Name' => $data['FirstName'],
			'CustomFields' => [
				'LastName' => $data['LastName'],
				'Company' => $data['Company'],
				'Phone' => $data['Phone'],
				'Mobile' => $data['Mobile']
			],
			'Resubscribe' => true,
			'RestartSubscriptionBasedAutoresponders' => true
		];
		$subscriber = CMSubscriber::create(null, $fields, $list);
		$subscriber->Save();
	}
```

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance86

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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.

###  Release Activity

Cadence

Every ~1332 days

Total

4

Last Release

77d ago

Major Versions

3.0.x-dev → 4.0.02019-07-12

4.0.0 → 5.0.02025-10-12

5.0.0 → 6.0.02026-02-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6a363b2d85dc3e82e73cc9e3a57fc15132920b166c5938ad63a54029b9f94b9?d=identicon)[tractorcow](/maintainers/tractorcow)

---

Top Contributors

[![tractorcow](https://avatars.githubusercontent.com/u/936064?v=4)](https://github.com/tractorcow "tractorcow (18 commits)")[![jules0x](https://avatars.githubusercontent.com/u/8979741?v=4)](https://github.com/jules0x "jules0x (6 commits)")[![alex-dna](https://avatars.githubusercontent.com/u/6982515?v=4)](https://github.com/alex-dna "alex-dna (2 commits)")[![kmayo-ss](https://avatars.githubusercontent.com/u/1711912?v=4)](https://github.com/kmayo-ss "kmayo-ss (1 commits)")

---

Tags

silverstripeCampaign Monitor

### Embed Badge

![Health badge](/badges/tractorcow-silverstripe-campaignmonitor/health.svg)

```
[![Health](https://phpackages.com/badges/tractorcow-silverstripe-campaignmonitor/health.svg)](https://phpackages.com/packages/tractorcow-silverstripe-campaignmonitor)
```

###  Alternatives

[casinelli/laravel-campaignmonitor

A Laravel 5 wrapper for Campaign Monitor

1444.7k](/packages/casinelli-laravel-campaignmonitor)

PHPackages © 2026

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