{"id":536,"date":"2012-03-25T12:25:07","date_gmt":"2012-03-25T12:25:07","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=536"},"modified":"2012-03-25T12:25:07","modified_gmt":"2012-03-25T12:25:07","slug":"storing-login-date-marketing-tool","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/storing-login-date-marketing-tool\/","title":{"rendered":"Storing last login date as a marketing tool"},"content":{"rendered":"<p>If you&#39;re not already tracking your users&#39; last login date in your database, you might want to consider it. The storage space footprint is minimal, and it provides another way to keep tabs on your user activity.<\/p>\n<p>It can also be an effective email marketing tool. Imagine if you were able to tailor an e-newsletter to only those users who haven&#39;t logged in for over a year. You could explain the changes to your site that have happened since they last logged in. Not to mention the effect of personalizing an opening line, such as<\/p>\n<p>&quot;We haven&#39;t seen you in months!&quot;&nbsp; or &quot;We haven&#39;t seen you in years!&quot;<\/p>\n<p>On the technical side, if you are concerned about space, use only your databases date field, as it uses less space than a full timestamp field. However, if space is not an issue, it may not be a bad idea to store the date and time of user&#39;s last login.<\/p>\n<p>Keep in mind, you don&#39;t want this to be a &quot;default timestamp&quot; field. For example, some databases provide a quick TIMESTAMP field which automatically updates whenever any field in the record is updated. For obvious reasons, this is a bad idea. It will lead to inaccurate last login times. Stick with the DATETIME field, and update it during the user authentication process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#39;re not already tracking your users&#39; last login date in your database, you might want to consider it. The storage space footprint is minimal,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[13,19],"tags":[160],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/536"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=536"}],"version-history":[{"count":1,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/536\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/536\/revisions\/537"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}