i would like to edit a Cookie value before I use it as a data source. Is that possible?
I tried to use the extension: "Set Data Values" to write the value into a new data source with that JS script: "uneditedCookieValue.substr(13,5);"
But at the end the data source was empty! Can anyone help me?
You should probably contact your AM so that we can check out the configuration that you have.
Speaking at a high level, all 1st party cookies are automatically read and injected/added as part of the utag_data object. If you want to edit the value, you should create a new data source to contain the edited value and map that new data source to the tag. Within the Set Data Values extension you can reference the cookie using b["cp.cookieName"]. For a better example...
Say you have a cookie called "myCookie" and you want to parse out part of the value. First, create a new Data Source called "myNewVariable". Next, add a Set Data Values extension that sets "myNewVariable" to "JS Code" with a value of "b['cp.myAffilate'].substr(13,5)". Then map "myNewVariable" to the tag needed the parsed data.
This should do the trick.