Remove Order ID Prefix — Google Analytics Enhanced Ecommerce via GTM - google-analytics

I have an issue with some inconsistencies in the data passing through to Google Analytics (GA).
I'm sending Shopify purchase event data to GTM formatted as per the Enhanced Ecommerce docs here. While I can confirm my Order IDs do not have any prefix, eg.. simply 12345, some records populated on GA include a # prefix while others do not.
I'm wondering if there are any settings or quirks with GA configuration that could be leading to this inconsistent behavior.
Thanks!

You can use a Search and Replace filter to apply to the View where you define a rule based on your pagePath where the orderid is present.

Related

Pageviews and views differences between GA4 and Universal

Working on "converting" a Google Data Studio report from Universal to GA4 and I am noticing a significant differences with some metrics, such as new users and pageviews
In Universal, I got this for Pageviews
But I am getting these results on GA4 for the exact same period:
The same for new users:
Vs GA4
I know GA4 and Universal are tracking metrics differently , but it looks to me that the numbers are way different
What am I missing here?
I was looking where you were initially and had the same reaction, until I realized that in GA4, the pageview stat is considered an Event and when I went to that section, I found the far more accurate stat (still slightly off from UA but within that percentage margin that Google states may exist). Navigate to Reports > Engagement > Events. The page_view Event should have the more accurate total you are looking for when comparing to the Page View number traditionally found in UA.
Do you have any filter to remove query parameters in Universal Analytics?
GA4 does not have filters to remove query parameters. Is your home page, landing page for your campaigns?
In GA4, the dimension you have selected is page path + Query String. In this case URL [page path] will also have details of query parameters.
There might be multiple rows present with home page URL with query parameters appended.

Switching Google Analytics IDs based on authentication state?

Per this law.stackexchange question it's possible to use google analytics without getting consent and still comply with the GDPR.
I was thinking about creating two GA properties for a single domain name. One that switches off all the features that the GDPR requires for non consent and another that tracks users that have consented and have an account setup where they can make opt out changes, manage cookies etc.
Is it possible to track the same GA property / browser client using two different GA ids that correspond to the different configuration settings?
In other words when the user is logged in, the user gets tracked by the consented GA id, but when the user is not logged in and anonymous the user gets tracked by the GDRP compliant non consent GA id?
Yes. You just need to determine the technical identifier of a logged-in user (probably a cookie or js variable), then use that identifier to pivot tracking logic. If you have analytics.js or gtag.js hardcoded on your site, then you'll want to change your main embed code to have conditional values for the tracking id and anonymizeIp.
If you're using GTM you can use lookup tables with the logged-in identifier as the input. Use these lookup tables as the value for GA Tracking IDs or other tracker fields. If you're not using the GA Settings variable (which you should!), just make sure you set these config value in every GA tag.
Alternatively, if your primary GA Property can be otherwise compliant, it might be an option to track both consenting and non-consenting users in a single property, and pivot only the anonymize ip setting (analytics.js/gtag/gtm), not the GA tracking ID. It's possible to pivot advertising features tracking-side too.

enableEcommerce: false for Enhanced Ecommerce?

I need to know why my Purchases are not being stored in Google Analytics, the Preview of Google Tag Manager shows that I've enableEcommerce set to false, but as you can see I've this in Google Analytics Turned ON.
After following documentation, I've this dataLayer only in the thank you page:
As you can see:
1) I'm generating the products Array,
2) The tag is fired correctly.
3) enableEcommerce : false
Point 3 is what is not clear to me, because I've Ecommerce Enabled:
enableEcommerce: false
UPDATE 1
Based on kgrr's answer, this is my current setup.
event fires
dataLayer:_
dataLayer (first field name)
Google Analytics TAG Variable
UPDATE 2
Not as conversion:
Based on all the details, you have shared, there a few errors, that you should fix, to get your purchase tracking working.
Your tracking ID is incorrect. You can provide a tracking ID either by adding it directly as a Tracking ID, or adding it as part of a Google Analytics Setting variable. (Where it will be provided similarly as Tracking ID). At the moment, you pass your Google Analytcs Settings variable into the tracking ID field. As you have already prepared this type of variable, I suggest to use it in its proper place, but remove tracking ID provided from the Google Analytics tag. The only setting to be overwritten, is the enhanced ecommerce setting. (As it seems from the images.)
Your purchase object is not following the enhanced ecommerce format. Based on the documentation, the products array is part of the purchase object. At the moment, they are siblings in your code, so GTM won't be able to process, and append it to the event.
Your product objects are not following the enhanced ecommerce format. At the moment, you are not using the proper keys in your product objects, so GTM won't be able to pass this data to Google Analytics. This is a general reference about the product data, and this is a working example, how various attributes are passed to GTM. You should fix the key-value pairs to match the format requested by GTM.
Update:
Also, you must ensure, that enhanced ecommerce feature is enabled in your Universal Analytics tag or your Google Analytics Settings variable. If it's not enabled, GTM ignores this data.

Custom trigger showing up in Google Analytics - but NOT the value itself

I have a gtag account setup and that also connects to google analytics.
And I have made a successful tag/trigger to make event tracking for when an FAQ item is opened at my clients FAQ-page
I am sending the trigered FAQ question text as a value as well. And I wish to have a list in Google Analytics in which the questions are shown in a list.
Am I missing something? Should I setup the trigger/tag in another way, or am I missing something in the GA.
Thanks for taking your time.
DEBUGGER
TAG CONFIGURATION:
GA:
The event value in Google Analytics must be a number. You are currently passing {{Click Text}} string, which actually gets ignored by ga object, and will not reach Google Analyitics. More details on event tracking.
Basically, you should send this text data in a text field into Analytics.
Original recommendation, using custom dimensions:
I recommend you to set up a hit based custom dimension, where you can submit additional text data in connection to your event. You'll be able to analyze it as a secondary dimension in standard event reports, or by creating custom reports.
In GTM, you have to modify either the Google Analytics setting variable, or the Analytics tag itself, and assign the desired value (click text in your case) to the custom dimension ID, which you have created in Google Analytics. E.g. custom dimension 6 gets passed like this:
An other option, based on Eike's suggestion:
You can also use any of the other standard event fields for this, e.g. send it in the label. As pointed out, this can even hold larger set of data (500 bytes), compared to custom dimensions (150 bytes). This is also easier to be implemented in GA and GTM as well, as you don't have to deal with custom dimension creation and reporting.

How to find adwords GCLID id in google analytics and link it to conversions manually?

I'm using a 3rd party tracking software (tracking202) to track conversions (as I can use the google conversion tag directly on my site, for some reason). Now, I've complete tracking data including keywords, placement and IPs of the converted users. Now, since Auto Tagging is enabled in my adwords account, google used glid id on my URLs since the beginning. I want to upload conversion data to adwords through the offline conversions import feature. And for that, I've 2 queries:
Where do I find the gclid ID in google analytics?
How do I link the converted IPs with GCLIDs ? (Since I have the converted IPs list in tracking202, if there's a way to filter IPs in google analytics and set the GCLID as the secondary dimension.. I would be able to collect the converted GCLIDs. But I'm not sure if its posisble in google anlaytics.
Please suggest what I can do in this case. Thanks a lot.
Google Analytics does not make the glcid accessible via the interface. If you want to get at the gclid you would have to store them yourself in a session scoped custom dimension (obviously this will not work for data already collected).
You need to create the custom dimension in the property settings (under "Custom Definitions") and then add a bit to your tracking code (poorly written PHP code for demonstration purposes only):
ga('create', 'UA-XXXX-Y', 'auto');
<?php if(isset($_GET['gclid'])) { ?>
// Set value for custom dimension at index 1.
ga('set', 'dimension1', $_GET['gclid']);
<?php } ?>
// Send the custom dimension value with a pageview hit.
ga('send', 'pageview');
i.e. "if there is a query string variable called glcid assign it's value to the custom dimension with the numeric index 1".
Technically the same works for the client IP address (which is likewise not displayed in the GA interface or exposed via the API). However you must not (as stipulated by the Google TOS) store information that allow to identify a user in Analytics (it might depend on your legislature if IP addresses are personally identifiable information. I don't know Googles stance on this, but it would be illegal in the Europe, at least without explicit consent of the user).
You may however store an anonymous identifier that allows to pull information from GA and connect it to information stored in other systems, so if you store e.g. the strongly hashed IP both in GA and in your other tracking system then you can use this as a key field to merge the records outside of GA.

Resources