I have set up GA4 and GTM, connected it with shopify and implemented a datalayers snippet into shopify following this github repo: https://github.com/TechnicalWebAnalytics/dataLayer-shopify
Now my problem is that the prices which are tracked are without decimals in GA4 and so the revenue is way too high. I found that in the dataLayer-allPages.js file there is for every price an modificator that tells 'remove: ","' I guess that this is the problem. I have removed those modificators and in GTM Debugger it now shows the prices with decimal places but in GA4 I can't see transactions for the time after I have made those changes.
Here I have marked the prices that are tracked in GTM Debug View after I have removed the remove: "," liquid modifier in my code
Related
I have setup google tag manager and enable Standard Ecommerce but can't see to get this to work.
I have set up a trigger to fire on transactionComplete in GTM
And you can see the dataLayer being properly filled!
In the variable field - it says ecommerce is not enable (remember - I did enable it).
And here is the programmed DataLayer with all the required fields.
Any guidance much appreciated. Does it really take some time to populate the Google Analytics ecommerce field. I am concerned it is not working because of the flag that indicated it is not enabled. Thank you for any guidance.
I believe that the problem is due to the transaction with value 0 together with the product with price 0. I would try to assign at least one price to the product (not to the transaction).
I created a custom metric in Google Analytics to track users who end up on that page.
This is the metric:
This is my setup in Google Tag Manager:
While I can see from GTM preview that the tag is firing, I don't understand why I don't see anything related to this in the Realtime -> Events (https://i.imgur.com/uLYvyWk.png).
Question 1: why does nothing show up? Do I have to wait until tomorrow for data to be populated in the reports view? If so, is there a way to instantly check whether the tag is tracked by GA? Having to wait 24 hours to know whether the tag is firing sounds abit long.
Question 2: Am I setting up my custom metric correctly? The intention is to track the error rate of users and be able to see which geographies / age range etc they come from.
Thank you!
the GTM tags in your screenshot are Pageview tags, so they wont show in the Real time > Events section. Check the Real time > Content report for your pageview being fired.
If you want to pass the metric with an Event, you need to create an Event tag and add the metric to the Event tag.
I have a test Google Ads account and a Google Tag Manager account. I have set up my conversion tracker in the test Google Ads account and I have deployed it to my site using Google Tag Manager.
What I am trying to do now is simulate an ad click so that the data layer value on my purchase success page shows up in a report in my test Google ads account.
Here are my conversion tracker settings in the test Google Ads account:
Conversion name: myname
Category: Purchase/Sale
Value: Use different values. If there's no value, use $1.
Source: Website
Count: Every conversion
Conversion window: 1 week
View-through window: 1 day
Include in "Conversions": Yes
Attribution model: Last click
In Google Tag Manager I have setup a Google Ads Conversion Tracking tag and input the Conversion ID and Conversion Label from the test Google Ads conversion tracker - the trigger for this is set to fire on all pages. In Google Tag Manager I have also set up a Conversion Linker tag which is set to fire on all pages. And in Google Tag Manager under Variables > User-Defined Variables I have created a variable name called order_value.
I put the Google Tag Manager JavaScript on all my pages and on the purchase success page I put this above the Google Tag Manager JavaScript:
<script>
dataLayer = [{
'order_value': 131.77
}];
</script>
If I turn on Preview/debugging in Google Tag Manager I see all the expected tags and data layer values in the debug pane on my site.
Now what I am trying to do is simulate an ad click so that when I complete a purchase the data layer order_value will show up somewhere in my test Google Ads account.
I have tried going to:
mysite.com?gclid=test
in order to simulate an ad click. But when I purchase after that nothing shows in my test Google ads account(no conversion nor the data layer order_value). To clarify I specify the gclid on my home page and then I have to navigate to several other pages(cart, checkout, etc.) before I arrive at the purchase success page(which has the data layer order_value variable).
How can I get the order_value to show up in my test Google ads account when I purchase? Do you see any obvious issues with my setup? How would you approach figuring this out? Should I try something simpler first? The test Google Ads account and the Google Tag Manager account have a different primary email address - would that matter?
You will action this from within Tag Manager.
Step 1: Create a User-Defined Variable
Step 2: Pass that variable to Google Ads via the conversion tag setup.
Regards to your test conversions not appearing in Google Ads - please make sure that your conversion pixel is correctly firing on your conversion/thank-you page.
If it is, then I think the issue may lay with the fact that you aren't testing a real Google Ads served click, and thus Google Ads conversions is truly zero.
I'm implementing GTM on an e-commerce site. The problem I have is that we have lots of products and lots of promotions on the same page and Google is limiting the size of the request. That means that not everything pushed onto the dataLayer is getting sent to their servers.
On my last try, I separated the data onto different objects, and pushed them both to the dataLayer
But when I inspect the requests made to Google with a plugin like HttpFox, only the data from dataLayer[3] is getting sent.
What can I be doing wrong?
How does google expect us to send data in large e-commerce sites?
I've search a lot about this topic but couldn't find any help.
Send the first batch with the pageload, and every subsequent data with an GA event. You always need an interaction event (pageview or event) to send enhanced ecommerce data.
At the moment, as you have pointed out, GTM will pick the last thing you pushed to the datalayer (since the keys are the same the previous data is overwritten in the internal GTM data structure, which is an object rather than an array of objects).
So you push the additional data, add a custom GTM event ( e.g.{"event":"addData"} and build a trigger that fires on that custom event. GTM will pick the lastest ecommerce data from the datalayer and use it for GA. After the tag went through you push the next batch etc.
I am trying to implement Enhanced Ecommerce (EE) for Google Analytics (GA) using Google Tag Manager (GTM) but don't see any data showing up in GA.
Using the GTM preview mode, I can see that the data in the dataLayer is correct and that the right Tags are fired. I have also made sure to (correctly) create separate Tags for all the things I want to measure, which are:
measuring the product detail view
measuring the checkout process (both checkout steps and checkout options)
measuring purchases
Perhaps I should also note that I am developing from localhost, but I don't think that should matter (?).
Edit:
When composing this question I was unable to post images, but I later realized I can post links of course. So, for clarification:
Tags that are fired on my Product Detail Page:
http://oi60.tinypic.com/2woeqe8.jpg
The dataLayer containing the ecommerce data:
http://oi59.tinypic.com/6s7yxd.jpg
It turned out working localhost actually was the problem, my solution to this problem is explained here: https://stackoverflow.com/a/29214212, but in short: go to Tags > My Tags > Configure Tag > More Settings > Fields to Set, type in 'cookie' in the Field Name input field, select cookieDomain from the suggestions, and set the value to none.