Updating ecommerce transaction flaw - google-analytics

So i have following situation going:
User makes purchase request (And transaction is sent to google
analytics with 0 value).
After some time Operator confirms purchase (And transaction is updated and revenue is set to according amount)
This works like a charm so far. The Problem is the fact that when updated transaction is sent, it also, somehow, updates where transaction was sent from. for ex... if referral user made a purchase, before update i can see transactions next to referral users but after update it disappears from there since operator is not referral user. this is just one downside. Next being the fact that website has two domains, but one actual website, so if user made a transaction from domain2, after operator updates transaction, i cant see it in the "domain2 view" since operators log in "domain1".
so, how can i make it so that only revenue updates and it doesnt touch anything else?

Related

Google Ads / Analytics / Tag Manager: E-Commerce transaction not set in relation to Ad Click

We have a problem with E-Commerce transactions sometimes not beeing set in relation to an ad click ("cpc"). They appear instead with the Channel/Medium "direct". This is a problem as we cannot correctly link our revenue to the costs spend on Google Ads.
We got a payment system that allows buyers to safely pay to sellers, and we get a fee percentage of the payment volume (similar like PayPal). We get our fees as soon as a pay-in is successful. Because our users can pay via bank wire as well it may take one or two days until we actually get our fee. This is why ecommerce transactions are not sent from the frontend to GA (on a thank-you page like in online shops), but from our server directly to GA as soon as a payment succeeds.
This is the GET call our server does when a payment succeeds:
GET https://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-1&cid=1746XXXXX.1593XXXXXXX&t=transaction&ti=mytransactionID&tr=1&cu=USD
Here is a small diagram that explains the process:
We use cross-domain tracking, and the GA Client ID of the users stay the same when they get redirected from mydomain.com to app.mydomain.com, so this should not be the problem. What I assume is, that when a user clicks on an ad, the gclid of the ad is lost. Is there a way to manually send the gclid ID to Google Analytics? I would store the gclid then as well in our payment. Or is there another (maybe better way) to send transactions to GA?
Your transaction hit will only be attributed to ad-click session if payment occurs in a 30-minutes interval since the last hit with the same ID. Otherwise, the transaction hit would start a new session. Due to 'last-non-direct' rule the new session would only be associated with "cpc" channel if there were no other intermediate sessions after ad click. Please check the Google Analytics extensive overview for deeper insight.
Storing and passing gclid might help, however, this might result in some discrepancies in cost reporting since there would be several sessions for the same click. In the case of passing gclid it's recommended to pass at least two hits:
a simple pageview hit with a dummy location parameter containing gclid
and then later a transaction hit with the same location paraeter. In that case you'll be able to see your transactions as a separate sessions with a distinct landing pages
You should make sure you're using the GA client id in the Measurement protocol hit to ensure the hit gets stitched to the other hits of that user.
Now regarding reporting: Google Analytics uses the attribution model "Last non-direct Click", despite the hit being sent later, GA will ignore direct and use the previous touch point which should be the PPC campaign.
There shouldn't be an issue there. Which report are you using to see the transaction appear as direct, rather than Paid Search?

Prolem with assigning transactions to the users in Google Analytics

We are using google analytics for tracking the users and revenues.
Our revenues arrive in batches usually 24-48 hours after the session.
We are using the batch API:
https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#batch
with the transaction hit type:
https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#ecom
We are setting properly (at least we think so) all the parameters:
Example:
v=1&tid=TRACKING_ID&cid=CLIENT_ID&t=transaction&tr=EARNINGS_IN_USD&dl=USER_URL
We are currently facing following problems:
almost all our incomes (like 99.8%) are assigned to the returning users (when you look at the tracking data we have < 40% of returning users)
almost all our incomes are assigned to the users with landing page not set
What can be causing that? Why the transactions are not joined with sessions?
The cause of this is how Google Analytics understands and processes sessions. For example, a group of hits (HTTP requests to www.google-analytics.com/../collect) sent by JS code while the visitor interacts with your site within some reasonable time range is considered a session. When a user interacts with your site the next day a new bunch of hits are sent and these hits are processed as a separate session. So when you're sending transaction data in 24-48 hours after the time user last interacted with your site this will create a new session. Since there was a user visit before a transaction data were sent a newly created session is reported as a session of the returning user. In the same manner, since there's no page path / document location parameter in your transaction data this newly created session would have (not set) as a landing page.
Check the documentation for more insights.

GA shows Bad Event Tracking Code message

since these days, Google Analytics start to show message "Bad Event Tracking Code" for several my projects. Even for one mobile app profile.
The message:
"The Landing Pages report has a (not set) entry. Verify that tracking code for property Mobilni Aplikace sends a _trackPageview hit and that it does this before sending any events."
I didn't change anything in these projects, so I don't understand what Google Analytics want.
Has somebody similar issue?
Thanks
Google Analytics just recently added a means of notifying you of problems so you didn't have to change anything to cause this issue. It could be preexisting.
EDIT: Solution 1 and 2 may help, but what worked was "Solution 3" -- Upgrade to Universal Analytics and increase session length.
Solution 1 - Send less tracking data
If the Google Analytics property is for a high traffic site without Google Analytics Premium you are limited to 10 million hits per month including events Data Limits - Analytics Help. In this case analytics may have recorded a user's event but the pageview was ignored to keep your account within limits.
If you could be flirting with this limit try sending less event tracking by reinventing or removing some event tracking entirely. If you are blatantly violating the data limits track only a subset of users by setting the Sample Rate in your analytics.js (or ga.js) code.
Solution 2 - Find the problematic event code
If you are not going over the data limits you have an event being sent before a pageview.
Methods of debugging "(not set) entry present in reports for property" are described on this page What the value (not set) means - Analytics Help.
Verifying this issue:
Go to the Analytics property with the issue and click Behavior reports > Site Content > Landing Pages
If you see landing page = (not set), this is generally due to a session with no page or screen view level hits included.
It’s possible to have a session that doesn’t include a page or a screen view, but does include another kind of interaction hit type, like an Events or Ecommerce hit type.
Debugging this issue:
Identify which hit type is causing the issue:
use the advanced filter (found at the top of the data table) to
restrict the data to include page/screen views matching exactly 0
For each of these 3 reports:
Behavior > Events
Acquisition > Social > Plugins
Conversions > Ecommerce reports
Note: The "page/screen views" dimension may have disappeared in advanced filters under those reports, I will update this answer when I find out more.
Solution 3 - Session is expiring before user leaves site
You can configure a visitor's session length for your property in Session Settings under Tracking Info.
The default length of time for a session or campaign. An individual session or campaign for a given user ends after the amount of time specified here has passed (counting from the start of the session or campaign), so long as the session or campaign has not been stopped though another means. Learn more about Learn more about session and campaign timeout handling.
If the user's session expires but they haven't left the page and another event triggers there will be no page view before the event has triggered. In this case your site would fall under this category:
The length of a session and campaign depends on your site and business. Here are a few ideas to get you started thinking about session and campaign timeouts:
Lengthen the session time if you have a lot of content and expect users to take a long time engaging with that content. Conversely, shorten the session time if the site has a small amount of content. 5
Increase the session length under Session Settings so these events will still have an associated pageview.
Note: You can only configure the session length if you're using Universal Analytics.
Google Analytics is currently in the process of migrating to a new operating system, the tracking code you have given in the comments appears to be the classic code. based on the information you have given in relation to your application, I believe you would be affected by phase 2 of the migration which has recently taken place
You can find a timeline of migrations along with instructions about how to upgrade your applications the the new analytics.js tracking code here:
https://developers.google.com/analytics/devguides/collection/upgrade/#phase-2

Clear transaction & items before submitting to prevent duplicate E-Commerce data in Google Analytics?

I am looking into using (Universal) Google Analytics to track e-commerce transaction data, and would like to put my call to send the transaction data on my thank you page after the user completes the checkout process. I'm learning that many people who do this have issues with duplicate transaction data being submitted when a page refresh happens. I was wondering if immediately before my transaction and item data, could I just call ga('ecommerce:clear'); so that it clears the transaction if it had already been submitted, resulting in only one version of my transaction when I submit it to Google?
maguidhir, I am afraid that reloading the page with e-commerce tracking code would send the duplicate transaction anyway as it would get created again.
There is an interesting article by Matt Clarke that deals with this in 3 different ways.
You can also use Google Tag Manager and make sure the e-commerce request gets send only once per session. Make sure though that you include Transaction ID as one of the condition, because technically you could make two e-commerce transactions during one session.

Google analytics ecommerce with delayed payments

With a paypal like system it's easy to track the transaction with the auto-return setting and ?utm_nooverride=1 parameter, since after the payment the user is redirected back to the site.
But what if we have a system with delayed payments?
User adds to cart, checkout, but he just pays for the transaction tomorrow.
Is it possible to track a transaction like this?
I'm able to store some vars and pass them to the callback function to later use.
just as a sidenote here, in your case, there is no need to use 'utm_nooverride=1', since usually it wont take more than 30 minutes to checkout on the paying service site, the visit will be maintained when the visitor returns to your site.
About your question, unfortunately there is no way to achieve this kind of transaction, because the transaction is a visit-related tracking, and when the user comes back tomorrow to pay, it will be a new visit.
Also, as probably the user doesn´t really have to go back to your site to finish his purchase, I don´t really see the possibility.
Augusto Roselli
Web Analytics - dp6

Resources