Closed ayako-hira closed 1 year ago
@kkouta config.inc.phpにemail_tracking = 'Yes'を設定すると、アクセス数は取れそうです。
なお、これをYesにすればURLの方も動きそうですが、動かないです。
public function convertUrlsToTrackUrls($content, $crmid, $type = 'html') {
if ($this->isEmailTrackEnabled()) {
$extractedUrls = Vtiger_Functions::getUrlsFromHtml($content);
foreach ($extractedUrls as $sourceUrl => $value) {
$trackingUrl = $this->getTrackUrlForClicks($crmid, $sourceUrl);
$content = $this->replaceLinkWithShortUrl($content, $trackingUrl, $sourceUrl, $type);
}
}
return $content;
}
public function replaceLinkWithShortUrl($content, $toReplace, $search, $type) {
if ($type == 'html') {
$search = '"' . $search . '"';
$toReplace = '"' . $toReplace . '"';
}
$pos = strpos($content, $search);
if ($pos != false) {
$replacedContent = substr_replace($content, $toReplace, $pos) . substr($content, $pos + strlen($search));
return $replacedContent;
}
return $content;
}
config.inc.phpのemail_tracking = 'Yes'を設定するとアクセス数、クリック数ともに確認できました。
動作としては下記に記載します。
@yutakoseki
インストール時にconfig.inc.php
が生成される際に、上記コンフィグを生成するようにしてください。
概要(Overview) モジュールの関連タブにある「メール」一覧に表示される「カウント」が動作していない
再現手順(To Reproduce) 不具合の発生手順を細かく記載してください。 (Steps to reproduce the behavior:)
スクリーンショット(Screenshots)
不具合発生時の利用ブラウザ Blowser(please complete the following information):