Currently, we are facing some challenges with a website called . It appears that only the PPC traffic source is affected by changes caused by the pageviews being pushed through to analytics.
Since the website operates on Ajax, we need to utilize Javascript to mimic pageviews when links are clicked. Instead of using Google Tag Manager for implementing analytics and javascript due to this reason, we are following the gtag method as per Google's guidelines:
gtag('config', 'GA_TRACKING_ID');
To investigate further, I visited the site through a PPC ad and monitored the real-time reports in Analytics. Initially, the correct source (cpc) is attributed to the traffic upon the first page load. However, when clicking on a link to navigate to another page, the traffic source suddenly switches to Google Organic search. Furthermore, any action triggering an event or goal results in the same status of organic attribution in Goal Reports.
It seems evident that the Javascript-based pageview sent to analytics for simulating new page loads is causing this alteration in traffic sources. Despite strictly adhering to Google's gtags recommendations, we’re puzzled as to why this change occurs. If anyone has encountered a similar issue before, we would greatly appreciate insights on how to resolve it.