Hello,
I am capturing the lead sources in url format. All the pages have utm's which can be identified as lead sources. I am capturing this url in a hidden field on the form with the help of below script -
<div style="display:none">
<script>
MsCrmMkt.MsCrmFormLoader.on("afterFormLoad",
function() {
document.getElementById("d21380f8-684a-ed11-bba2-0022483ddf2d").value = document.referrer;
});
</script></div>
I want to know if I can split the url here and only get the utm's in form submissions. Then from form submissions if I can auto populate a custom field on Lead entity.
Thanks.
Hi Partner,
Maybe you can refer to the following link, which guide that how to get URL + UTM Parameters with Javascript:
https://www.gkogan.co/blog/save-url-parameters/
Also, you can refer to the following links to get UTM Parameters through other ways:
Holly Huffman
103
Muhammad Shahzad Sh...
96
Most Valuable Professional
Gerardo RenterÃa Ga...
51
Most Valuable Professional