How to display all emailadress which has open within x days
Moderator: moderator
How to display all emailadress which has open within x days
Hello,
is there a way to display all emailadresses which has open a newsletter within x days (lets say the last 14 days)?
Thanks!
is there a way to display all emailadresses which has open a newsletter within x days (lets say the last 14 days)?
Thanks!
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: How to display all emailadress which has open within x d
You could define an open action which sets a profile field in the recipient's profile to the current timestamp. Based on this profile field you could create a target group to filter the wanted recipients.
OpenEMM Maintainer
Re: How to display all emailadress which has open within x d
Thank you for your answere. Could you please tell me how I set the current timestamp? I have added an action to modify the field. In the drop down menu there are +, - and = and a text Box. I habe tried to insert [agnDATE], but this won't work.
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: How to display all emailadress which has open within x d
Please have a look at the user manual.
OpenEMM Maintainer
Re: How to display all emailadress which has open within x d
Hello,
thanks, but I still have problems. I like to write an own action script which set my field to current time. So I found this http://forum.openemm.org/using-openemm- ... c2483.html and tried to change it.
My code:
But zeit is empty. Could you give me an advise?
Thanks!
thanks, but I still have problems. I like to write an own action script which set my field to current time. So I found this http://forum.openemm.org/using-openemm- ... c2483.html and tried to change it.
My code:
Code: Select all
$ScriptHelper.println("---------------START----------------")
$Customer.resetCustParameters()
$Customer.setCustomerID($customerID)
$Customer.setCompanyID(1)
$Customer.loadCustDBStructure()
##$Customer.loadAllBindings()
#set($parametros=$Customer.getCustomerDataFromDb())
## For each parameter we want to update a line like this:
set($parametros.zuletzt_aktiv=$requestParameters.zuletzt_aktiv)
## Timestamping
#java.util.Date date = new java.util.Date()
long zeit = date.getTime();
$ScriptHelper.println(zeit)
$requestParameters.put("zuletzt_aktiv", zeit)
$ScriptHelper.println($parametros.zuletzt_aktiv.toString())
#if($Customer.importRequestParameters($parametros, null))
$ScriptHelper.println("parametros SUCCESS")
#else
$ScriptHelper.println("parametros FALSE")
#end
$ScriptHelper.println("$CustomerID | 1 | $parametros")
$ScriptHelper.println("changeFlag: $Customer.changeFlag")
#set($Customer.changeFlag = true)
#if($Customer.updateInDB())
$ScriptHelper.println("Customer update SUCCESS")
$ScriptHelper.println($Customer.zuletzt_aktiv.toString())
#else
$ScriptHelper.println("Customer update FALSE")
$ScriptHelper.println($Customer.getCustomerDataFromDb().zuletzt_aktiv)
#end
$ScriptHelper.println($Customer.getCustomerDataFromDb().zuletzt_aktiv)
$ScriptHelper.println("-----END------")
#set($scriptResult="1")
Thanks!
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: How to display all emailadress which has open within x d
I do not see a parameter "zeit" in your example. BTW, do you have read the script action documentation?
OpenEMM Maintainer
Re: How to display all emailadress which has open within x d
If you mean "OpenEMM-ScriptActions_Documentation_1.7.pdf", yes, or is there an other document?
Did not this mean to store the date in a variable "zeit" of type long? I am not firm with Java, mostly I coding PHP so I am a littlebit confused with the "$" in the examples, but those code samples of Java I have read looks like type var_name = "some thing";
The ";" is an other point I am wondering. As I thought all lines should end with a ";" like in C/C++, PHP and other languages with has there origin in C.
Code: Select all
long zeit = date.getTime();
The ";" is an other point I am wondering. As I thought all lines should end with a ";" like in C/C++, PHP and other languages with has there origin in C.
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: How to display all emailadress which has open within x d
The $ is a part of Velocity. This is a Velocity script, using java methods and objects of OpenEMM.
OpenEMM Maintainer
Re: How to display all emailadress which has open within x d
Thanks, could you please tell me whether the DateTool is installed or not.
I have tried:
Prints: Today: $date
In your action script doc you use:
java.util.Date date should give back the time stamp, but if I try to set up a var it stops at java an result an error. Is this not possible?
Thanks!
I have tried:
Code: Select all
$ScriptHelper.println("Today: $date")
In your action script doc you use:
Code: Select all
$BindingEntry.setChangeDate(java.util.Date date)
Thanks!
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: How to display all emailadress which has open within x d
The expression "java.util.Date date" in the doc is written in italics. This means that it is a placeholder to be replaced by an object of the specified type.
OpenEMM Maintainer