Dr TJ
Dr TJ

Reputation: 3356

How can I catch UTM Cookies values?

I'm trying to Log into a website using WebRequests in C# But the website is using Google-Analytics libraries which is making some UTM-Cookies
The question is how can I catch those cookies values and pass them to the website?

Upvotes: 0

Views: 592

Answers (1)

Dan
Dan

Reputation: 9837

The HttpWebRequest class has a CookieContainer collection property that you can add instances of the Cookie class.

The HttpWebResponse class has a Cookies collection property that contains instances of the Cookie class.

Make your request, read the cookies from the response, and add them to any subsequent requests as needed.

Upvotes: 1

Related Questions