承接 openbuildings/swiftmailer-google-campaign 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

openbuildings/swiftmailer-google-campaign

Composer 安装命令:

composer require openbuildings/swiftmailer-google-campaign

包简介

Append to all email links google campaign parameters

README 文档

README

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version

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

$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:

<html>
    <body>
     <a href="http://example.com">Example.com</a>
    </body>
</html>

Will be converted to

<html>
    <body>
     <a href="http://example.com?utm_source=source&amp;utm_campaign=email&amp;utm_medium=email">Example.com</a>
    </body>
</html>

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:

<html>
    <body>
     <a href="http://example.com?google_campaign=your_campaign">Example.com</a>
    </body>
</html>

Will output:

<html>
    <body>
     <a href="http://example.com?utm_source=my_custom_source&amp;utm_campaign=my_custom_campaign">Example.com</a>
    </body>
</html>

License

Copyright (c) 2013, OpenBuildings Ltd. Developed by Yasen Yanev as part of clippings.com

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

统计信息

  • 总下载量: 171.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 2

GitHub 信息

  • Stars: 3
  • Watchers: 10
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-09-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固