SOLVED

Re: Form on PURL page is not updating correct user record

Go to solution
Kaye_McClendon
Level 3

Hi, 

 

I have a PURL website that has dynamic content based on the known user (their name is in the URL). On page load, it recognizes the correct user because it has their name on top banner (via tokens).  The problem I'm having is that when I fill out the form, it is creating a new record in the database, instead of updating the known user's record. How do I resolve this? 

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
13 REPLIES 13
SanfordWhiteman
Level 10 - Community Moderator

Are you attempting to change the Email Address of the existing lead by using a different value on the form?

Kaye_McClendon
Level 3

No, I'm updating their Major, Phone, and Parent Email.  When I look at the activity log for the associated user, it doesn't show they've filled out the form and it didn't update their record. 

 

By the way, the PURL page I'm testing is using your PURL fix from this article: https://blog.teknkl.com/fixing-marketo-purls/?marketo-nation

I don't think that's the issue, but it should know which user record to update based on the PURL, right? The PURL includes their Marketo Unique Name. 

SanfordWhiteman
Level 10 - Community Moderator
What's an actual (p)URL so I can look at it?
Kaye_McClendon
Level 3

http://discover.uindy.edu/junior/KayeMcclendon

 

By default, there's general intro text to the left of the form. After you choose a major and submit the form, and go back to the PURL page, the intro text is should change to be more relevant to the major you selected, and a new form will display. But it's stuck on the default content because the user's record did not actually get updated. 

SanfordWhiteman
Level 10 - Community Moderator

Add the system Email field to the form as a Hidden field with Pre-Fill enabled.

Kaye_McClendon
Level 3

Okay, I've added the hidden field. I left the default value as "null". I cleared my browser's cache and tried submitting the form again. It's now updating one of the new records it created from yesterday. See the screenshot for notes.

 

Screen Shot 2020-02-15 at 11.02.00 AM.png

SanfordWhiteman
Level 10 - Community Moderator
Set the default value to

{{lead.Email Address}}
Kaye_McClendon
Level 3

This is very weird. It looks like sometimes the forms work, and sometimes they don't work. It's very unpredictable. By the way, both forms are embedded via token. Could that be a problem??

 

I removed the {{lead.Email Address}} hidden field since that wasn't working. I unapproved the Junior page and re-approved it. I cleared my cookies in Chrome. When I fill out the form on this PURL: http://discover.uindy.edu/junior/KayeMcclendon, it works fine now. However, the first few times I did that, it didn't work, so I don't know why it suddenly works now.

 

Then, when I open another tab in Chrome and fill out the form for this PURL: http://discover.uindy.edu/junior/JasonMcclendon

and it applied the form responses to this PURL instead: http://discover.uindy.edu/junior/KayeMcclendon

 

I can't understand why this is happening. We're going to email PURLs to thousands of students and I'd like their responses to apply to their record only. I'm not confident it will work correctly if I'm getting such weird results for my test users. 

 

I'm not sure if this is relevant to the issue,  but here's a screenshot of the Chrome console whenever I load the page. Would this is causing the problem?

Screen Shot 2020-02-17 at 12.20.59 PM.png

 

SanfordWhiteman
Level 10 - Community Moderator

It's not unpredictable, it's that you haven't figured out what the variables are. 🙂

 

N.B. It's basically impossible to have truly random behavior on a web page without deliberately invoking a random number generator -- and browsers' (P)RNGs weren't even random enough until recently! Of course, you can have behavior that varies based on network/server responsiveness, and those other factors can make the overall result appear to be random, but once you figure out the inputs you can get predictable output. In this case it isn't going to be related to network/server behavior. I'm sure it's down to the order in which cookies are set, stored, and reset. You shouldn't have needed my pURL fix anymore - that's one thing that tells me something is non-traditional about your testing and/or setup.

 

It isn't related to those Chrome warnings. (You can and should test in other browsers to rule that out anyway.)

 

What you need to make sure you're doing is not "clearing your cookies" but working in Incognito/Private mode and making sure all Incog/Private tabs are closed if you want a clean slate again (Some people don't understand that Incognito tabs do store cookies, as long there's at least 1 such tab open.)

 

Note in Firefox, when you work in Private mode Tracking Protection is on by default. You want to turn off TP while testing, because in this particular case you're using Private mode to emulate a fresh browser with no cookies, not for privacy protection.

 

Kaye_McClendon
Level 3

Actually, I'm still using your PURL fix because that's the only way I can get the correct person's token/name to display in regular browser mode. The thing is when person A's PURL is opened and I submit the form, it updates their record correctly. However, when I open person B's PURL on the same device and same browser, it updates person A's record instead of person B's record. What if two siblings (twins) open their PURLs and fill out the form on the same home computer and browser, they will encounter the same problem? I really wish Marketo had a solution to prevent this. 

 

Most people probably won't be opening links via Incognito mode, so I try not to use Incognito when testing because it'll give me a false positive result. 

 

Kaye_McClendon
Level 3

Hi, 

 

I'm revisiting this issue because I've been running into the same issue again. It was working fine for several weeks. However, we recently switched our domain from HTTP to HTTPS. Now, I am having the initial issue that I had when I first posted about this. I've got this URL on my Chrome in Incognito mode: https://discover.uindy.edu/junior/KayeMcclendon

It's displaying my name correctly in the header. However, when I fill out the form on the right side, my form values are going to a new record: https://discover.uindy.edu/junior/ACMEBEW-1

I've tried using different browsers Firefox, Safari, and Chrome, but it's still not updating the correct record that corresponds to the correct Marketo Unique Name. Any suggestions?

 

 

SanfordWhiteman
Level 10 - Community Moderator
Kaye_McClendon
Level 3

I added {{lead.Email Address}} as the default (see screenshot), and opened a different PURL link http://discover.uindy.edu/junior/JasonMcclendon. However, it placed my form submission under a different record that was created a few days ago (see screenshot), and it didn't actually insert the correct email. It literally posted it as I typed it "{{lead.Email Address}}".

 

Screen Shot 2020-02-17 at 8.38.58 AM.pngScreen Shot 2020-02-17 at 8.39.30 AM.png