SOLVED

Re: Capture GCLID On Website & Hidden Form

Go to solution
SanfordWhiteman
Level 10 - Community Moderator

Re: Capture GCLID On Website & Hidden Form

You can use this extended code: https://codepen.io/figureone/pen/bGqrNEp

 

Set storage to "sessionStorage".

mreillysalsify
Level 1

Re: Capture GCLID On Website & Hidden Form

Hi @SanfordWhiteman, this code is EXCELLENT! We're trying to extend this functionality to also capture standard UTM.
Our goal is to cookie utm_campaign, utm_source, utm_medium & utm_term values for the duration on the browser session to cover the use case when a paid source may bring someone to homepage, and/or the user doesn't immediately covert on page with the referral UTM link.
Would you recommend doing this with the same code, or do you have another set of code handle cookieing this info?

SanfordWhiteman
Level 10 - Community Moderator

Re: Capture GCLID On Website & Hidden Form


Would you recommend doing this with the same code, or do you have another set of code handle cookieing this info?

You can’t do that with this same lightweight Auto-Fill code. There’s a whole other codebase we use for that.

mreillysalsify
Level 1

Re: Capture GCLID On Website & Hidden Form

@SanfordWhiteman Is that codebase proprietary or are you willing to share with the community?

SanfordWhiteman
Level 10 - Community Moderator

Re: Capture GCLID On Website & Hidden Form


 Is that codebase proprietary or are you willing to share with the community?

It’s not proprietary (in the sense of not allowed to be used by other parties) yet I’m unable to share it due to Community rules.