JSFiddle - React, Tailwind, and code Playground
JavaScript
var url = document.URL;
url="http://xyz.com/?utm_campaign=freeship&utm_content=COUPON_CODE_HERE"; // remove this line on the website
var campaign = url.match('utm_campaign=([^&]*)');
var content = url.match('utm_content=([^&]*)');
console.log(campaign[1]);
console.log(content[1]);