I was struggling with this issue for almost a month. I asked for help on Google, ChatGPT, and Reddit, but I didn’t get an exact answer. I did my own research and found that the solution was actually very simple.
Let me explain a little bit about my website. Our website is www.coderobotics.com. We are a professional script development company and a marketplace platform for selling ready-to-use source code. I develop and sell ready-made software source code and PHP scripts.
Here is a sample product page:
https://www.coderobotics.com/product/olx-clone-script.
This page has user demo and admin demo buttons. When a user clicks on one of them, they are redirected to a demo link on a different domain:
This is the exact link when someone clicks the demo button. If you look closely, you’ll notice that the URL looks awkward—Google Analytics is adding some tracking code to the link. I had been trying to remove that for a month and sought help from various sources including Google and ChatGPT. Although I got different suggestions, the issue persisted.
But it was supposed to redirect.
Eventually, I found the solution within Google Analytics 4 itself. Unfortunately, I had mistakenly enabled cross-domain linking for my demo domain, buyphpcode.com.
Because of that, GA4 started tracking the demo domain as well, which resulted in this extra tracking code being added to the URL.
After I disabled the Cross-Domain Linking settings in GA4, the issue was resolved.
If you’re facing a similar issue, try the same fix. And feel free to drop a comment—I’d be happy to help!
This entry was posted by Sasi and tagged in How I Fixed Google Analytics Cross Domain Tracking Issue on the Website
No comments yet. Be the first to comment!