SOLVED

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Go to solution
Gary_Verster2
Level 2

Adding a timestamp to a preference centre change log - timezone problems!!

Hi everyone,

In preparation for GDPR next year, I'm trying to create a text field that will capture every change that our users make on our preference centre, including a timestamp.

I've already created the preference opt-ins and the timestamps - these are all pretty much working as I'd like. But in the trigger campaign that writes the [timestamp + preference change] to the change log, the timestamp gets changed, even though the timestamp field itself is correctly populated.

Here is the flow for the smart campaign concerned:

pastedImage_0.png

(I've already worked out that Marketo doesn't like adding a boolean as a token in Step 2, hence the 'choice' approach).

I've tried adding the {{system.dateTime}} token to the Change Log instead, but the result is the same. I assume this is something to do with timezones?

Anyone have any ideas?

Regards,

Gary

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Hi Gary, this is expected behavior... think of it like running plain toString() on a date, which outputs it in the current tz + locale (even though it is stored as UTC).

View solution in original post

7 REPLIES 7
Mark_Price
Level 7

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Hi Gary,

The changelog step could be the issue.  It looks like it might only store your last value instead of a rolling history.

Maybe try something like this in the flowstep:

{{lead.Consent - Preference - Alerts Timestamp}} User changed Alerts Opt-In to TRUE. | {{lead.Consent - Change Log}}

^ you could also just use the system date stamp here.

**Note: Check the token on the Consent - Change Log, this is just an example. Also you can use something other than a pipe character to split the values.

Gary_Verster2
Level 2

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Hi Mark,

Thanks for the reply, chap.

Yeah, I was planning to prepend to the Change Log using Sanford Whiteman's line-break token trick (http://blog.teknkl.com/dark-mkto-alleys-line-break-token/) instead of using a pipe; just wanted to get the actual timestamp bit populating correctly first. Marketo seems to populate the Consent - Preference - Alerts Timestamp field correctly, but when I try to add the timestamp to the Change Log, it weirdly defaults to EST. Not ideal...

Mark_Price
Level 7

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Hi Gary,

Nice to see another http://blog.teknkl.com subscriber. 

hmm, that's a strange problem. Can you post a screenshot of the activity log maybe ?

What if you did this to set the change log :

{{system.dateTime}} User changed Alerts Opt-In to TRUE. | {{lead.Consent - Change Log}}

Gary_Verster2
Level 2

Re: Adding a timestamp to a preference centre change log - timezone problems!!

I tried using the {{system.dateTime}} token, too. Same result...

pastedImage_0.png

As you can see here, the Timestamp field is populated just fine, but as soon as you 'write' the timestamp to the text field, I lose 4 hours! Strange.

I guess the alternative is for me to add a timezone to the Change Log, i.e. EST (or whatever), so that if we ever need to use the log, we know to facto it in.

Oh, and a general little testing tip that might be worth noting... when you use gmail addresses for testing, you can create as many aliases as you want (How to Hack Your Gmail Address to Add Accounts ). Really useful!!

Anonymous
Not applicable

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Hi Gary,

What value do you see in lead info tab for preference alert timestamp?

Did you try adding 2 min wait in these steps?

Thanks,

Gunjan

SanfordWhiteman
Level 10 - Community Moderator

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Did you try adding 2 min wait in these steps?

? Field updates are synchronous (not to mention that using {{system.datetime}} doesn't have any dependency on other Flow steps).

SanfordWhiteman
Level 10 - Community Moderator

Re: Adding a timestamp to a preference centre change log - timezone problems!!

Hi Gary, this is expected behavior... think of it like running plain toString() on a date, which outputs it in the current tz + locale (even though it is stored as UTC).