11

I need to create a list of cookies and their sources. Is there any way to understand from which script particular cookie comes from? For example, '_ga' cookie is definitely set by some of the google analytics script, but is it possible to identify which script exactly?

1 Answers1

10

Some of the cookies are set by ajax-responses (you can find such cookies in Chrome Dev Tools -> Network tab and make a search with string 'set-cookie:').

As for the rest, I took a code snippet from here Breaking JavaScript execution always when cookie is set but instead of debugging I'm calling console.trace() function, which actually shows functions and their sources. That's it!