The manipulation of Analytics with artificial pageviews is altering the source of traffic for PPC campaigns

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.

Answer №1

Our team encountered a similar problem, but after conducting further research, we were able to identify both the issue and the solution, all thanks to insights shared by Simo on his website.

The key to resolving this issue is to manually configure the document.referrer during the initial session to ensure its persistence throughout without being overridden midway. This is a common challenge faced with GTM and single page sites.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Add a fresh category to a JSON document

Combining Express (Node.js) and Mongoose, I am developing a REST API and attempting to implement JWT token-based login. However, I have encountered an issue. Upon executing the code below: const mongoose = require('mongoose'); const User = mongo ...

Find your favorite artist on Spotify through the search function

Recently, I stumbled upon this intriguing demo showcasing how to search for an artist using the Spotify API. However, despite several attempts, I have been unable to make it function properly. Can anyone provide any tips or guidance on making this work suc ...

Grouping an array of arrays of objects

I am trying to group an array of objects based on the value of the first item below: const data = [{"value":"value1","metric":1},{"value":"value1","metric":2},{"value":"value3","metric":0},{"value":"value2","metric":4},{"value":"value3","metric":1},{"va ...

How to implement dynamic color for classes in a v-for loop using Vue.js?

Struggling with a seemingly simple issue that may be easy for VueJS pros. In my data, I have JSON objects with an attribute that can take values of 10, 20, 30, or 40. Depending on this value, I want to change the color of a v-btn. I've attempted mul ...

Generating and Importing Graphics through Iterations in Javascript

I apologize for my lack of experience in this matter. Can someone please guide me on how to utilize a loop to load images? For instance, could you show me how to rewrite the code below using a loop to automate the process? function loadImages() { let ...

Loop through each item in the JSON object

After making an ajax call, I receive a json object in the success callback with the following structure: {test 1: Array(2), test 2: Array(3), test 3: Array(2)} The arrays inside each key have elements that look like this: 0: {IdProduct: "1", ProductName ...

Encountering a GraphQL error during the compilation process

I've been following along with this informative tutorial: https://www.gatsbyjs.org/blog/2017-07-19-creating-a-blog-with-gatsby/ After completing all the steps, I encountered a GraphQL compile error: GraphQL Error There was an error while compiling y ...

Discover the key to optimizing your JavaScript development workflow by automating project structures and eliminating the need to start from scratch

I was looking for a way to streamline the process of setting up project structures for my projects so that I could utilize ALE linting and fixing without any hassle. After trying out one method, I'm confident that there must be a more efficient soluti ...

Is there a way to replicate ajaxStart and ajaxStop functions without using jQuery?

After reviewing the extensive jQuery code, I'm wondering if this task would be simple to accomplish. Any suggestions on how to approach it? I'm interested in using this not for a webpage, but for a C# application that needs to monitor ajax activ ...

Steps for modifying the CSS class of an <a> tag with Jquery/Javascript

I am attempting to dynamically change the class of a tab on the dashboard based on the selected page. In the dashboard, there are 3 tabs: <div> <ul class="menu"> <li class="MenuDashboard"><a href="#" >Dashboard</a&g ...

Unable to switch between screens. VueJS

I am in the process of creating a dynamic gallery where users can view and navigate through different images. Currently, I have successfully set up the functionality to display images upon user interaction. However, I have encountered an issue while tryin ...

dividing a solitary string (plain text only, no HTML) evenly among three separate div containers

Recently, I encountered a frustrating dilemma. I'm trying to split a string between three divs, but they are not equal in height, so I can't divide the string based on character count. To illustrate the issue, I've created a small sketch. ...

Attempting to implement a smooth fade effect on my image carousel using React-Native

Struggling to animate this image carousel in reactNative and feeling lost. Despite reading the documentation on animations, I can't figure out how to implement it properly. My attempts keep resulting in errors. Any assistance would be greatly apprecia ...

Navigating through the additional plugins in WebDriver

After installing a plugin in Chrome, the next step is to access it through webdriver. Here's how you can do it: File addonpath = new File("path of .crx file"); ChromeOptions chrome = new ChromeOptions(); chrome.addExtensions(addonpath); WebDriver dri ...

Setting a specific time zone as the default in Flatpickr, rather than relying on the system's time zone, can be

Flatpickr relies on the Date object internally, which defaults to using the local time of the computer. I am currently using Flatpickr version 4.6.6 Is there a method to specify a specific time zone for flatpickr? ...

The Bootstrap navigation menu fails to extend the parent div when toggled

When I toggle the button to show the menu on small screens, the menu overflows the parent div with id=contents instead of pushing it down. How can this issue be fixed? Here is the code: <body> <nav id="header" class="navbar navbar-default"& ...

Utilizing Spiderable within Meteor results in the replication of head content before it is presented in the body tags

Having trouble with my meteor site, thought it was Google indexing, now suspecting an issue with the Spiderable package. Meteor version 1.1.0.3 is in use, along with spiderable package and gadicohen:phantomjs as suggested by meteorpedia. The current issu ...

Error message: "The variable _ is not defined when trying to use angular-google-maps library"

I'm encountering an issue where I'm receiving a ReferenceError: _ is not defined while using the angular-google-maps I'm puzzled as to why this error is occurring, as I believe I am following the instructions provided on the website. I hav ...

What measures can be taken in React to ensure that only authorized users are able to access the admin privileged layout

In a hypothetical scenario, imagine having a full-stack web application with an admin-dashboard on the front-end side. Now, let's say I am NOT an admin, but I attempt to access a route like /api/admin/dashboard Within the React app, there is authent ...

The absence of the 'Access-Control-Allow-Origin' header was noted on the requested resource. This occurred within an ExpressJs environment

I have encountered a CORS issue even though I believe I am setting the correct headers on every request. Since I couldn't get the standard way of setting the headers in the middleware to work, I have been setting them explicitly for each API method: ...