Google Analytics Enhanced Ecommerce Questions - google-analytics

I'm trying to implement the Enhanced Ecommerce tracking with Google Analytics and ran into a few questions.
Can you only send impressions with the pageview event? So how would I send impressions of items loaded after the initial pageview event?
I wanted to send product impressions on search result pages, which are in blocks of 10. When I try to send along with the pageview, it never sends, I'm guessing because it's too long for Google, so how would I send multiple at 1 time? I can get upto 6 products and have it still work.
Should I just use an event to track impressions? Would this solve the sending and size issue if I made a call for each product?
Any guidance would be appreciated. I feel the documentation is lacking a bit with some specifics.

You don't need to necessarily send ecomm data with the pageview. As stated here https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce, in the "Sending Enhanced Ecommerce Data" section:
Note: Ecommerce data can only be sent with an existing hit, for example a pageview or event. If you use ecommerce commands but do not send any hits, or the hit is sent before the ecommerce command then the ecommerce data will not be sent.
There's also more information in this SO post: Tracking catalog product impressions - Enhanced Ecommerce Google Analytics.
I'm not sure if there is a hit limit for EE transactions as there are for other types of hits (limit of 500 hits per session), but if you are worried that you'll reach some limit, whether it's EE or not, or if you think you'll send more than 20 hits per second, then you can throttle the hits being sent to Google.

Related

Google Analytics - Measurement Protocol - Hits not recognized/visible in Enhanced Ecommerce Reports

Google referred me to this forum, since they did not have a solution to the following issue.
So the issue we are facing is that hits send via the measurement protocol are registered by Google Analytics in the real-time- and events reports, but those hits are not captured in the Enhanced Ecommerce reports (especially the shopping/checkout reports). However, hits that are send via the hit builder are reported by GA in both the event and real-time reports as in all the Enhanced Ecommerce reports.
Detailed description
20th of June: An user (ClientID: 945403652.1592644568/userID 1234567890) completed an
application (checkout step 1, application) on the website for the vacancy with name 'developer' and id
'12345'.
2th of July: With use of the measurement protocol an
offline event for completing the job interview stage (checkout step 3, 'gesprek') is send
to Google Analytics. The hit is recorded and visible in the events and real-time reports but is not visible in the enhanced ecommerce reports.
The following hit was send via the measurement protocol with a GET request:
v=1&t=event&tid=UA-123456-1&cid=945403652.1592644568&cd20=945403652.1592644568&uid=1234567890&cd8=1234567890&cd7=gesprek&ec=measurement%20protocol&ea=checkout&el=step_3&ev=1234&ni=1&pa=checkout&pr1id=12345&pr1nm=developer&pr1br=12345&pr1ca=development&pr1va=amsterdam&pr1cd10=3771&pr1cd11=hbo&pr1cd12=5-10%20jaar&pr1cd13=32-40%20uur&pr1cd15=2019-07-04%2016%3A23%3A24&pr1cd18=3500%20-%205000%20euro&pr1cd19=gesprek&cos=3
7th of July: We send the same hit for completing step 3 of the
checkout via the hit builder. The hit is visible in the real-time and events report and is
somehow captured by all the Enhanced Ecommerce reports as well.
Other notes:
Enhanced Ecommerce is enabled in GA
Checkout steps are defined in GA.
We currently see some transaction hits that are send with the MP coming into the GA enhanced
ecommerce - sales reports, but those hits are also not visible in the
checkout/shopping behaviour reports.
Does anyone knows what causes this issue and how this issue can be solved?
Many thanks.
I did some testing with your hit, both with the hit builder and a system I created in Apps Script and, as I imagined, there is no difference as the parameters are the same.
The result was always that the events were in Real Time report and in the Events report but not in the Enhanced Ecommerce report.
However, looking at the parameters I noticed that the event is non-interaction. By removing the ni parameter and sending a new hit, the information also appeared in the Enhanced Ecommerce report.
This is because the checkout report is session based but a non-interaction event does not generate any session (here you can find a study I did some time ago: https://www.analyticstraps.com/utenti-senza-sessioni/).
So, so what I hypothesize may have happened is that in one case (2th of July) only the non-interaction event was sent (and did not appear in the ecommerce report), while in the other case (7th of July) it was sent either before or after an interaction hit (for example a pageview or other event) or a session of that user was in progress, therefore the event was associated with that session and appeared in the Enhanced Ecommerce reports.

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?

is Google Analytics RollBack possible?

I've updated refund information with transaction ids which i get from our e-commerce site API. it seems our api sent transaction ids that was not sent to Google Analytics 360 in the first place. So I see refunds in Google Analytics 360 that is not added as Sale before.
I have API Call response ids logged.
Can I make a call to Google Analytics to rollback that actions for that ids ?
Any idea ?
Google analytics data is write only. Once the hits have been sent they are set in stone there is no way to rollback anything you sent to Google analytics.
If this is an ecommers transaction then what is normally done is that you send another hit negating the original hit. So if you sent 1 and you want to remove it you send a -1 and it works out in the end. see reverse eCommerce transaction

Tracking offline conversions with Google Analytics

On a website with affiliate links, where there is no programmatic access to the conversion logs, I treat it as offline conversions.
My Setup
Online
A user visit my website, see the affiliated ad and a promotion view hit is being sent.
When the user clicks the ad, a promotion click hit is being sent and the user is redirected to another page on my site.
On the "redirection page", an product view hit is being sent, and the user is being redirected to the affiliation link, passing his Google Analytics clientId.
Offline
Once a week I download the stats from the affiliate program, which looks something like:
clientId visits conversions revenue
4444444444.3333333333 1 0 $0
1234567890.1234567890 1 1 $16.40
Then I use the Measurement Protocol to send offline events:
For each line of visit, I send a product click hit.
For each line of conversion, I send a product purchase hit.
My Problem
The conversion shows up on the eCommerce report:
Because the offline hits are being sent after the original session is already closed, a new session is opened which doesn't contain the info about the user.
So I can't see the conversion on the demographic report, for example:
Optional Solution?
I'm thinking of using the user-id feature of Google Analytics.
Even though the users are not identified, I can identify them by their clientId.
Sure, this is not what Google intended when they introduced that feature, but I believe it will solve my issue. I'm just not sure about the negatives.
My Questions
Any feedback on my setup?
Why is it even necessary to pass the clientId after the session is closed? what kind of information is being shared between the real session and the offline hit?
Is it a bad idea to pass the clientId as a userId to Google Analytics? Why?
Relevant Articles
A Comprehensive Guide to Tracking Offline Interactions in Google Analytics using the Measurement Protocol
Google Universal Analytics isn’t Linking Offline and Online User Properly
We were able to link offline action through as you did with measurement protocol but the problem is that those sessions are not included in demographic and age report.
Rather looking those report I used them to do segmented analysis E.g. pages they have look at, sources they used to come also I used it with attribution model to understand best channels to drive more conversions.
Yes you can use CID as a user ID but I haven't tried it with offline tracking. Share the result with us.

How to set up Google Analytics with conversion tracking

I've been tasked with enabling Google Analytics ecommerce tracking on a client's website. I've read Google's documentation on the subject, but it made little reference to tracking conversion data, which is a feature that our client has asked for.
My question is this: on which page(s) do I need to add information regarding items/transactions? We have pages for shopping cart, payment info, confirmation, and receipt. The Google documentation only mentions putting this code on the receipt page, but I feel as though this wouldn't give us the information necessary to track conversions. Is Google Analytics able to track this information simply by virtue of having the general page tracking code on each page, or does transaction info need to be tracked across all of our checkout pages?
You only need the item/transaction tracking code (_addTrans(), _addItem(), & _trackTrans()) on one page, after the purchase has occurred -- in your case it sounds like the receipt page.
You do need to make sure that the general analytics code is on every page, including the checkout and receipt pages, otherwise you can lose the chain of tracking data leading up to the conversion.

Resources