[TYPO3-english] DirectMail statistics only for internal pages?

Oliver Salzburg kinggencha at googlemail.com
Mon Nov 7 17:52:45 CET 2011


On 2011-11-07 16:52, Peter Kühnlein wrote:
> Am 07.11.2011 16:35, schrieb Michael Cannon:
>> Oliver,
>>
>> Off the top of my head, from 2-3 years back when using direct_mail for
>> company newsletters, I didn't see statistics for external links or some
>> such either. In digging into the mod1 or mod2 equivalent, for whatever
>> reason when the data for the statistics table was pulled, the missing
>> data
>> type from the db table with column named type was missing.
>>
>> It might've been type 2 or something like it that was missing in the SQL
>> query. Once I hard coded it in, I could see the expected results in
>> direct_mail statistics.
>>
>> Thinking back, I wonder why I hadn't pushed up a bug report. Sorry...
>>
>> Michael
> Hi Oliver and Michael,
>
> I just tried it in one of my installations: external and internal links
> are treated alike regarding statistics. (Everything else would be
> strange, given that from the point of view of the recipient of the
> newsletter both are just links to some website.) So, external links too
> are given a jumpurl-parameter and all other parameters like internal
> ones, and thus can be tracked in the statistics, at least in the case I
> just tried.
>
> I'm using direct_mail v 2.6.10 here.
>
> Take care,
> Peter
>

Hi,

actually I meant something different.

You can generate newsletters from either internal or external pages.
The former being a page in your local Typo3 page tree, the latter being
any html page anywhere on the web.
"Internal" newsletters are of type 0, "external" newsletters are of
type 1 ("type" in this case refers to the "type" column in the
sys_dmail table).

mod4/class.tx_directmail_statistics.php contains this part at line 435:

$res = $TYPO3_DB->exec_SELECTquery(
	'*',
	'sys_dmail',
	'pid='.intval($this->id).
		' AND type=0'.
		' AND issent = 1'.
		t3lib_BEfunc::deleteClause('sys_dmail'),
	'',
	'scheduled DESC, scheduled_begin DESC'
	);

Which will only pull information from the database for newsletter
generated from "internal" pages.

I changed it to this:

$res = $TYPO3_DB->exec_SELECTquery(
	'*',
	'sys_dmail',
	'pid='.intval($this->id).
		' AND (type=0 OR type=1)'.
		' AND issent = 1'.
		t3lib_BEfunc::deleteClause('sys_dmail'),
	'',
	'scheduled DESC, scheduled_begin DESC'
	);

I assume this is the same change Michael was talking about.

Cheers


More information about the TYPO3-english mailing list