If you are trying to capture the query string pair listed in your first post and send the value into your campaign variable in Analytics, the way you've set it up should be fine. Since you've entered this at the tool level, DTM will process this on every page load. If you are using a single page app framework, this would only work on the first load (since single page apps only load the page once).
With that said, if your just getting started with DTM, I'd highly recommend you look into Launch, by Adobe. Launch is DTM's successor and is already being used by many of our clients. DTM will eventually be depreciated and is already considered a legacy product at this time with no new features or enhancements planed to be released. Launch is available to all Experience Cloud customers at no additional cost just as DTM is.
I've not created any rule, I have given it in overview tool and tried to fire the url in the browser. where I could not see the tracking code passed in to the campaign with the server call. The way that I'm doing is not an appropriate? Can you please suggest me how to proceed to track the vanity URL tracking.