is there a way to access a cookie data source value from an extension scope "PRELOADER"

Gold Contributor
Gold Contributor
 
2 REPLIES 2

is there a way to access a cookie data source value from an extension scope "PRELOADER"

Tealium Employee
Hi David, Since the Tealium library is not yet loaded you will need to write a piece of code to do this. Something like: {code:javascript} x=document.cookie; //gets all 1st-party cookies which returns a string x=x.split("; ") //splits the string on semi-colon which denotes a new cookie for (i in x){ //loop through the array of cookies to find the one you need if(x[i].indexOf("cookie name")==0){ //do something } } {code}

is there a way to access a cookie data source value from an extension scope "PRELOADER"

Gold Contributor
Gold Contributor
Thanks a lot really helped.
Public