When using the SagePay Form integration, the referrer in Google Analytics always shows as live.sagepay.com rather than the original referrer. This is because, when using this integration method, the user gets redirected to live.sagepay.com to complete the payment process before getting redirected back to the original website.
Since the payment templates on SagePay don't allow external scripts, we can't add the analytics tracking script here, which means cross-domain tracking is out of the question.
Is there a workaround for this problem? As many payment gateways are external and behave in a similar way I'm guessing this must be a fairly common issue?
You can add a referral exclusion in the Google Analytics account itself. This should prevent new sessions being created as per the docs:
https://support.google.com/analytics/answer/2795830?hl=en
Related
How to set up cross-domain tracking in GA4 right?
I followed official instructions: [GA4] Set up cross-domain measurement
I've added all the domains I need to the Date Stream Details - More Tagging Settings - Configure your Domains.
Added 'Google Analytics: GA4 Configuration' tag on the website using Google Tag Manager.
But now, when switching between domains, a lengthy parameter
(smth like "?_gl=11lop9ld*_gaNDcxNTp2McYzKjE2LTcxMjQwKLv._ga_3JP1WO1NB3MTYxNzEyNDA4Ny8xLjEuKOPxNzEyNLI5Ny40Nw..")
is added to the page address and the page does not open, a 404 error appears.
What could be the problem?
As #Tony McCreath said, It might be a problem on the website's end on handling unexpected query parameters. I already faced this problem while working on a client website, and there was nothing that could be done on the Analytics side to fix the issue. You can test if that's the case by adding any random parameters at the end of the URL to see if the website still works.
The lengthy parameter that is added to the URL is the way Google uses to identify that a user is coming from another domain. It's basically an ID that will link the user from the previous domain to the current one.
Our email marketer is sending email from GetResponse with a tracking code generated from another tool,
but we can't see if the users are coming from the email source.
Is it possible, because it is with tracking code generated from other tool, GA to mark it as direct traffic and is there a way to know it is coming from the email campaign? Also, I am not sure it is tracking it at all, becouse I don't see much traffic in the landing page. The GA is fired, I checked!
The tracking code includes the main domain and it redirects to a specific page.
Example: tracking.ourdomain.com/aff_c?offer_id=46&aff_id=76
You have to check in Landing Pages report (or All pages report), filtering by aff_id, if there are any sessions.
To track in correct mode the source you have to use UTMs parameters. You can build your URL with UTM parameters using this tool. It allows you to easily add campaign parameters to URLs so you can track Custom Campaigns in Google Analytics. Then you can find those sessions in source / medium report.
I manage a website that sells business cards: Oubly.com
I believe the previous developer did not install the Google e-commerce tracking correctly.
Every single transaction since 2014 has been attributed to
Direct.
Coming from previous experience working with another e-commerce site I know that this is impossible. The previous e-commerce site I worked with had various transactions from various sources.
conversions
The amount of transactions is correct, I just know that they all cant be coming from Direct.
How can the current developer tell if the tracking code was installed correctly?
Right now there's not enough information to tell you 100% what is your problem. But likely you are losing the cookie when tracking the transaction.
The most common cause is that the hostname of the page that tracks the transaction is different than the hostname on your website. Google Analytics stores a unique and random clientId in a cookie when a user visits your website. If your site suddenly changes to a new domain such as a payment partner domain the cookie won't be accessible anymore, so GA thinks this is a new user and recreates a cookie. That starts a new User and a new Session in GA often with the trafficSource of (direct).
The solution is to implement cross-domain tracking for GA. Cross-Domain tracking helps you pass cookies from one domain to another so GA knows that it's the same user.
I have some problems with the google analytics not working on production, I have made some fixes and used some plugins to check that the information sent to google is ok, but the problem is I cannot test properly on my sandbox since I do not have the credentials for the analytics account used on production instance. I will not have access to that account and I do not want to create a dummy account linked to my sandbox because I cannot have my sandbox address indexed by google. Is there any way to install a local server that emulates GA? Or a way to create a GA account and prevent it from indexing my sandbox address? I have found the urchin software that would have given me the possibility to install a local sandbox, but this was discontinued by google and I was not able to find it anywhere.
If by "indexing" you mean "becoming a part of the Google search index an appearing in result pages", that is not in any way related to analytics. If you have a problem that your pages Urls show up in GA (which really is the whole point of Analytics) you can programmatically pass dummy urls to the tracker:
ga('send', {
'hitType': 'pageview',
'page': '/home' // pass a virtual adress here per page
});
That way your sites structure will not be recognizable in GA (however this will make testing more difficult).
If at all possible you should have Google Tag Manager installed on the live page. GTM has a preview mode that allows you to directly in the live site without affecting other users (tags are only visible to visitors with the preview cookie).
As for emulating locally, no, not really. If you still use asynchronous tracking (ga.js) you can use setlocalGifPath and _setLocalServerMode to have the tracking data send to your own server, but that will not give you the interface - it just means you can create a log file with the google parameters that you have to parse yourself.
Universal Analytics does not (to my knowledge) have corresponding methods (they are a remnant from urchin days when people wanted to reprocess their data locally. As you've said urchin is now defunct and it would have been too expensive for a bit of local testing in any case).
I am trying to make the google analytic __utm.gif request using php. I have broken all the variables and the only one which I don't know about is utmu parameter. It is not documented anywhere.
When I see a pageview tracking request it is appended to the end of request as &utmu=qB~
While doing ecommerce tracking it is appended as &utmu=qBAL~
Please help me with this.
It is a bitmap of all of the methods used to build the request.
Source: http://glucik.blogspot.com/2011/02/utmu-google-analytics-request-parameter.html
utmu doesn't actually contain anything of external meaning. Google uses it to store some internal values that help them improve ga.js. It's not required to make any functionality work, so, your PHP code doesn't need to account for it.
However, you should know there are already a few long-standing PHP-based Google Analytics projects, like Server Side Google Analytics (SSGA), as well as the semi-official Google Analytics for Mobile PHP and PHPGA.