SOLVED

Re: Need Help Marketo UTM issue

Go to solution
Nitish
Level 2

Need Help Marketo UTM issue

Hi All,

I have created a marketo Attribution model and implemented a script and while testing when i am trying to fill out form ad try to submit it its capturing wrong UTM values. Also note the form is embedded form.

can somebody tell me why is this happening is this due to another script or something else  

Inkedimage (15)_LI.jpg

 

Nitish_0-1685679047159.png

 

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Need Help Marketo UTM issue

Gotcha! You need to extract the respective value parameter from the cookie instead of writing the entire JSON. I'm assuming you're storing UTMs in a cookie so those can be used if a visitor visits the page w/o cookies later. This is just simple extracting value of the correct parameter (in this case, the parameter is "value") from the JSON.

obj.value

 

View solution in original post

7 REPLIES 7
Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Re: Need Help Marketo UTM issue

My first question is why you are using a script to capture this? The most obvious way to capture your utm parameters on a Marketo form on any page is to include your utm fields as hidden fields on your form and autopopulate them based on the url parameter you can specify. No coding required, just make sure that the prefill is unchecked.

Nitish
Level 2

Re: Need Help Marketo UTM issue

the reason we are using the script is to track entire user journey and from where he came to and what pages he visited and where he fills out from. But surprisingly its not populating the stored values and  instead it 
utm_source__c: {"value":"linkedin","expiry":1685620713400}
utm_content__c: {"value":"request-demo","expiry":1685620713400}
utm_medium__c: {"value":"cpc","expiry":1685620713400}
utm_campaign__c: {"value":"23q1-h1-roi-global-en-dg","expiry":1685620713400}

all i wanted to know where is this "expiry":1685620713400 coming from 

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Need Help Marketo UTM issue

Gotcha! You need to extract the respective value parameter from the cookie instead of writing the entire JSON. I'm assuming you're storing UTMs in a cookie so those can be used if a visitor visits the page w/o cookies later. This is just simple extracting value of the correct parameter (in this case, the parameter is "value") from the JSON.

obj.value

 

Nitish
Level 2

Re: Need Help Marketo UTM issue

ok Let me try ... hope this works this time

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Need Help Marketo UTM issue

I agree with Katja here! Does your script do anything other than what the native prefill via UTM functionality already does out-pf-the-box? e.g., store the UTMs in cookies, read data from them if there's already a cookie present and a visitor comes w/o UTMs, etc.? If it isn't doing anything other than grabbing parameters from the URL and writing them to the respective hidden form fields, then I think it'd be better to use the native autofill hidden fields from the UTM parameters functionality for this. Also, I think it'd be helpful if you're able to share the page URL and the script you're using for us to troubleshoot.

SanfordWhiteman
Level 10 - Community Moderator

Re: Need Help Marketo UTM issue

FYI, when you obfuscate your actual URL and don’t provide a link, it’s impossible to get in-depth, accurate help.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Need Help Marketo UTM issue

A heavy +1 on this! It’s so difficult to give an accurate answer by just looking at the snapshots/part of the problem. We have to make many assumptions/exchange more back-and-forth comments to get to an accurate answer.