How to preserve utm parameters in wordpress website without plugin

787 Views Asked by At

My website is https://example.com/ When I run a campaign for example https://example.com/?utm_source=sourceexample&utm_medium=facebook

I want that when I navigate to any page the ?utm_source=sourceexample&utm_medium=facebook should also propagate in the URL. Currently when I navigate to any other page or click on a link the UTM parameters disappear from the URL.

I was expecting some piece of code to put in the function.php file which should fix this issue but unfortunately I could not find it. Please help me to achieve it.

1

There are 1 best solutions below

1
On

gravity from has this option inside the plugin. will display on end page on what page they started.

also in google analytics.