I am expecting someone to help me on the below. Below is the scenario
We are planning to track revenue, products sold etc and we have setup standard ecommerce tracking using GTM on my test domain. If the ecommerce tracking works fine on the test domain then, we have planned to move it to live.
Trigger I have setup
enter image description here
Tag I have setup
enter image description here
Data layer code placed on Confirmation page above the GTM container immediately after opening the tag
<script>
window.dataLayer = window.dataLayer || []
dataLayer.push({
'transactionId': 'XYZ',
'transactionTotal': 123,
'currencyCode': 'SAR',
'transactionProducts': [{
'sku': 'abcd',
'name': 'iphone',
'category': 'Mobile',
'price': 999,
'quantity': 1
}]
});
</script>
Here the problems are
1) Whenever someone lands on confirmation page in real time goal conversion visitors are showing as
two instead of 1 for that confirmation page.
2) I did continuously 4 bookings but only one booking is showing in goal conversions option and also
ecommerce tracking is also showing for that one booking only. But for all the 4 bookings GTM tag
triggered and also in real time conversions it showed for that 4 bookings.
3) After 15 mins again I made a booking then, that booking is tracking in analytics and showing
under conversions option.
I just want to know why does this happen. Why analytics is not tracking goal conversions if I do
bookings continuously from my system. Why it is tracking after that 15 mins of time.
2) Goals are registered only once per session, so unless you wait 30 minutes or remove the cookie the goal will be completed only once. Also if you re-use the transaction id this will be merged into a single row in the reports (try and set minutes as secondary dimension, that should break up transactions into different rows). Better use different transaction ids for testing (maybe random strings).
3) It seems by then your session has ended (unusual, session should be 30 minutes by default, or until a change of traffic source) and so conversions are recorded again.
As to 1) no idea really - if two users show up that would mean you create two GA sessons with different client ids, but there is nothing wrong with your trigger. I don't think this can be diagnosed without looking at your page.
Related
I've recently added a Google Analytics GA4 tag to a website for the purpose of counting the currently active users. Before, I could see the number of real-time users right now (I think it had a one-minute delay, but I'm not sure).
But in the new GA4, I can only see the number corresponding to 30 minutes, which is not what I needed.
I've looked around and found an option to add a time dimension of 1 minute, but it was for the old google analytics, and it didn't seem right to me.
Not sure if it's needed to provide my code for this question, but if it's a must, then I'll add it.
Edit:
#Run a realtime report to get desired metrics.
def run_realtime_report(property_id):
#Runs a realtime report on a Google Analytics 4 property.
client = BetaAnalyticsDataClient()
#Run the request.
request = RunRealtimeReportRequest(
property=f"properties/{property_id}",
metrics=[Metric(name="activeUsers")],
)
#Parse the response.
response = client.run_realtime_report(request)
...
return activeUsers
#Run the realtime report function.
def run_sample():
global property_id
return run_realtime_report(property_id)
The number of users in the last 30 minutes in GA4 is similar to the "active users on site right now" in Universal Analytics (UA). However after about 5 minutes of inactivity, UA sometimes assesses users are no longer active on the site. This realtime report was generated with pageviews in the last 5 minutes:
After 5 minutes of inactivity, the active users on site goes to zero:
In GA4, you could recreate that calculation by specifying the minutesRange in your realtime report request. This page describes the minuteRange parameter. As a JSON request, this report will only count users who were active in the last 5 minutes:
{
"metrics": [
{
"name": "activeUsers"
}
],
"minuteRanges": [
{
"startMinutesAgo": 5,
"endMinutesAgo": 0
}
]
}
This request is different from GA4 realtime reporting which highlights the "users in last 30 minutes" as the primary realtime metric:
I use Facebook Pixel for WooCommerce site and in Event Manager of Facebook Business profile I see message about this issue:
You're sending the same event ID for many instances of your AddToCart
events. Event IDs are unique identifiers that are used to deduplicate
identical events received from your pixel and the Conversions API so
they're not counted twice. To ensure Facebook is accurately counting
your events, each unique event instance needs its own unique event ID.
This may cause issues with the measurement of your events and the
attribution of your ad campaigns.
As far as I understand, eventID must be updated by JavaScript every time someone presses "Add to cart" button?
If it is right, where/when I should update this eventID?
If it is no, could you please tell what should I do to fix this issue?
(I am beginner in Facebook integrations and WooCommerce, so I am sorry if this question is too obvious)
I'm sending ADDTOCART event via FB pixel JS as below. I'm adding a unique number in eventID so that each time this is called it should have different ID with it.
var random_num = 1 + Math.floor(Math.random() * 100);
fbq('track', 'AddToCart', {
content_ids: ['1122', '3234'],
content_type: 'product'
}, {eventID: "AddToCart_" + social_media_eventId + "_" + random_num});
We have GA4 Enhanced Ecommerce working via GTM on our website. We are tracking all events mentioned in Google's documentation (e.g add_to_cart, begin_checkout, view_item_list).
With events such as 'view_item_list', 'begin_checkout' and 'purchase', we can see them in both 'Realtime' and the GA DebugView (they even show the 'Items' tab with all items within these events), and our dataLayer has no issues:
But when we try to view any of this data in Engagement > Events > 'view_item_list' (for example), the only data displayed is the standard Event Count:
As you can see from the screenshot, there are no parameters for 'view_item_list'. We are not sure how to get the actual data such as 'item_name' or 'item_list_name' to display.
Any help is much appreciated.
Thanks!
Edit:
We have now added these item-scoped parameters as custom dimensions:
However, it's been over 36 hours since we added these, some of these dimensions/parameters have generated cards but nothing is being generated by the 'Items' parameter.
Any help is still much appreciated. Thanks.
Item Names should be available in the "Ecommerce purchases" Report. You do not need to register the parameter as a custom definition for the "item_name" parameter. For example if you upload the "purchase" event in this example, then the item_name of 'jeggings' will be available in the Ecommerce purchases report:
What do you see in the Ecommerce purchases report?
I'm having a problem with Google Analytics with the funnel report. Currently I'm tracking transactions but my funnel report is showing that no one is entering the funnel. I have a tricky set up.
1) We are using a third party vendor to run our shopping cart and ordering process they want their tracking code on the site and we want ours.
For example:
_gaq.push(
['_setAccount', 'UA-10187XXX-1'], // OurDomain.com GA property ID
['_setDomainName', '.OurDomain.com'],
['_setAllowLinker', true],
['_setAllowHash', false],
['_trackPageview', '/customer_shopping_cart_funnel/personal_info_customer.html'],
['b._setAccount', 'UA-12670XXX-3'] // vendors GA property ID
, ['b._trackPageview', '/customer_shopping_cart_funnel/personal_info_customer.html']
);
2) Once someone enters the ordering process some of the urls do not change. I tried using _trackPageView like this:
// example for each step
['_trackPageview', '/customer_shopping_cart_funnel/step1.html']
['_trackPageview', '/customer_shopping_cart_funnel/step2.html']
['_trackPageview', '/customer_shopping_cart_funnel/step3.html']
['_trackPageview', '/customer_shopping_cart_funnel/order_confirmation.html']
3) This is how the funnel should go:
User lands on page to chose country for ordering process
User enters shopping cart
User selects products (User is able to visit multiple products)
User enters in buying information
User reviews order and submits order
Order confirmation page
The problem I have is that we need to track from the page that shows the flags, but within the shopping experience they can move around to several pages.
With the funnel, from what I understand, you need to specifically list all of the steps. What I did is assigned each product page the same _trackPageView value so the step was always the same.
What can I do here to get the funnel to report correctly?
Are you able to track these pages in other reports? If so, I imagine the problem is with how your goal funnel is set up.
Ensure the URL's you've set for each step are correct, and match just as they are listed in your reports. If you're using a profile filter to change how URL's are shown in your reports, make sure to take that into account. It might also be a good idea to mark the flag page as being a required step, as well.
As for specifically listing all of the steps of a funnel, the pageviews that take place during the visits do not have to match the exact sequence of the funnel to count towards the funnel and goal.
As an example, lets say your funnel is step1 > step2 > step3 > order_confirmation.
A sequence of page views including additional pages not specified in the funnel, such as, step1 > step2 > step3 > contact_us > order_confirmation, will still count toward the goal funnel.
Additionally, as long as the first page of the funnel was viewed prior to reaching the goal, Google Analytics will artificially backfill the missed pages to have at least as many views as subsequent ones.
Using the same example funnel as above, visiting the pages step1 > step3 > order_confirmation will still count as meeting the funnel goal, even though step2 was skipped. And, step2 will be "backfilled" as having been viewed even though it wasn't.
Thus, Google Analytics will display any visit that includes a pageview of step1 prior to a pageview of order_confirmation as matching every step of every funnel that has step1 as the first step and order_confirmation as the Goal URL. This means that assigning each product page the same _trackPageView value is unnecessary for the goal funnel to track properly.
What do people use to dig in to Google Analytics data?
For example, I have a web page that tracks a custom event on it. I'd like to track a couple metrics:
1) What percent of users on that page successfully call the event at least once?
2) How do I see a bucket of the number of times a user called the event while they're on the page (or in a session, whatever), such as:
0 times -> 800 visitors
1 times -> 200 visitors
2 times -> 150 visitors
etc
Ideally I'd get this data emailed to me on a regular basis, maybe with a chart for the second part. Suggestions?
Let's say that the event is a Video Play.
You must keep track of how many videos the user played. For that create a session cookie with that number, and increment it at each video play.
Then you can fire a CustomVariable (Page Scoped) to send the number of events the user performed at that page.
Something like this:
window.onunload = function(){_gaq.push(['_setCustomVar', 1, 'Video Plays', cookie_value, 3]);}
http://code.google.com/apis/analytics/docs/gaJS/gaJSApiBasicConfiguration.html#_gat.GA_Tracker_._setCustomVar
That should get you a nice report