I have a very specific requirement to trigger _trackPageView from my C# code because the event I want to trigger is based on my database values. If database returns me A I want to track it to different page and if it returns B I want it to be different.
Can I record _trackPageView from server side itself? otherwise I would have to make many hacks for making an Ajax request and get that database value and then call Google Analytics javascript code.
Is there any better way to do this?
Ajax seems the easiest way to do, but google analytics provide API, so you can call it from server side
https://developers.google.com/analytics/devguides/