- Implements open tracking
This commit is contained in:
@ -2,12 +2,14 @@
|
||||
namespace MailPoet\Newsletter\Renderer\PostProcess;
|
||||
|
||||
class OpenTracking {
|
||||
static function process($template, $user_id) {
|
||||
static function process($template) {
|
||||
$DOM = new \pQuery();
|
||||
$DOM = $DOM->parseStr($template);
|
||||
$template = $DOM->query('body');
|
||||
$open_tracking_link = sprintf(
|
||||
'<img alt="" src="%s/?mailpoet&endpoint=track&action=open&data=[mailpoet_data]',
|
||||
home_url()
|
||||
'<img alt="" class="" src="%s/%s"/>',
|
||||
home_url(),
|
||||
htmlentities('?mailpoet&endpoint=track&action=open&data=[mailpoet_data]')
|
||||
);
|
||||
$template->html($template->html() . $open_tracking_link);
|
||||
return $DOM->__toString();
|
||||
|
Reference in New Issue
Block a user