I want to track the URL of the current page, then pass it to a URL variable to the next page.
For example
https://www.mywebsite.com
https://www.mywebsite.com/about/?fromsource=https://www.mywebsite.com
https://www.mywebsite.com/about/careers/?fromsource=https://www.mywebsite.com/about
https://www.mywebsite.com/contact/?fromsource=https://www.mywebsite.com/about/careers
So everytime someone moves to the next page, the URL of the previous page is add to a URL variable in the next page.
I'm not sure if this is the right way. I would use Google Analytics API referral data. But you can create the following shortcode:
If you want to add the code via PHP code:
If you want to use it in your editor you can add url's as such:
The editor in the text mode, it will show up like this: