Obtaining analytics clientId directly from cookie variable

Ever since cookie variable was introduced, obtaining clientId  became pretty easy . In this method, we will use the Cookie Variable in GTM.  ( old post for extracting clientId with CutsomJs)

So, let’s start with the basics that, the  “_ga” is the name of GA cookie that stores the client id.



now we will go ahead and create a new variable of type “1st Party Cookie”  and at variable part give the name of cookie – “_ga”. This variable will extract the value of the cookie with name “_ga” .



Now, as usual, debugging / previewing  the job.