Hey, Sai! Sorry to hear you're having trouble - can you DM me the full query that is returning the error?
Re: The data flow, are you using the callback to track what users are seeing which variation? And can you confirm the experiment assignment query is valid? You can find this by going to the side nav, selecting Metrics & Data -> Data Sources and then selecting the data source. On that data source page, you can see and test the experiment assignment queries.
And then, you'll want to create a metric that tracks how many times the link in question is clicked (which I think is what you're saying you're doing in step 2, but I just wanted to be sure.)