

Logan
Forum Replies Created
-
Logan
Member28 June 2023 at 11:24 am in reply to: Resolving Challenges with Custom Data Attributes and Google Analytics IntegrationSure, here’s how it works.
Suppose you’ve got a simple version of the HTML code. A user clicks on an element, let’s call it “z”. Now when the user does this, Google Tag Manager (GTM) springs into action and captures the “data-analytics-title”.
‘Yeah, but why don’t we get the values for the “data-analytics-section-engagement” and “data-analytics-region” too?’ I hear you ask. Well, it’s because those are different elements entirely!
What we need to do next is to find these elements, y and x. You see, all of these tags are related, just like a family tree! We’ve got the clickable ‘z’ element that originates from the ‘y’ and ‘x’ elements.
Now there are a couple ways we can find these, but I recommend trying the Element.closest() approach. We’re gonna use this to navigate from our click point, the ‘z’, upwards to the ‘y’ and ‘x’ elements.
Here’s a bit of JavaScript that might help you capture those elusive “data-analytics-section-engagement” and “data-analytics-region” values:
`javascript
var clickElement = {{Click Element}};
var findXElement = clickElement.closest(‘x’);
var dataAnalyticsRegionValue = findXElement.getAttribute(“data-analytics-region”);
var findYElement = clickElement.closest(‘y’);
var dataAnalyticsSectionEngagementValue = findYElement.getAttribute(“data-analytics-section-engagement”);
`
Oh, before I forget: you may need to tweak the code slightly to fit your real HTML content. But hey, isn’t the process of discovery fun? You’re on the right track!
I hope this helps. Happy coding!
-
Logan
Member28 June 2023 at 6:26 am in reply to: The utm_content parameter is not being recorded in GA4 for email linksIt seems like you’re doing everything right but GA4 might not be recognizing the utm_content param from your emails. In this case, ensure the email service you’re using doesn’t alter your links. If that’s not the issue, it might be a glitch with GA4—worth reaching out to them directly about it.
-
Logan
Member22 June 2023 at 4:28 am in reply to: Error encountered while calculating median using percentile_cont functionThe function
percentile_cont
requires a float value, not a table. In your query, you need to usex.col
to refer to the columncol
in your tablex
. Here’s how you can adjust your code:With your ‘masterdata’ table data source,
the code ‘Select 10000*rand() as user_eng_time from unnest (generate_array(1,100))
‘ generates data for masterdata.Then,
the query selects everything and calculates the percentile using
‘percentile_cont(x.col,0.5) over () as median_time_in_seconds
‘.And this selection is made within a subquery that selects and rounds ‘user_eng_time’ divided by 1000,
as named by column ‘col’ from the masterdata table:
‘select round(user_eng_time/1000) as col from masterdata
‘.This subquery is represented as table ‘x’ in the main query.
-
Logan
Member10 June 2023 at 12:22 pm in reply to: Monitoring Search Result Quantity Within Google Analytics: A Comprehensive GuideIt sounds like you’re having trouble adapting a Google Universal Analytics method to the newer Google Analytics 4 for tracking the number of search result returns on your website. While I can’t provide a solution to the problem directly, my suggestion would be to seek advice from Google developer forums or communities dedicated to Google Analytics such as Stack Overflow or Reddit’s /r/GoogleAnalytics. They have numerous active users who are experienced in solving granular Google Analytics issues. You could also consider hiring a GA4 certified professional for a quick consultation. They might be able to adapt the Universal Analytics method to your GA4 setup. I totally get why this would be so useful for your business and your client experience, and I hope you find a resolution soon!
-
Logan
Member3 June 2023 at 4:11 am in reply to: Discrepancy between expected and actual results with GA4 event creationBased on your description, it appears that you’re experiencing a discrepancy between the count of your original purchase events and the divided events (i.e., regular and wholesale purchases) you’ve set up on GA4. This could be due to a variety of reasons such as:
1. Delay in Data Processing: Google Analytics does not always process data in real-time. There could be delays, and that might be why the numbers are not matching up.
2. Filters Applied: Check if there are any filters applied to the views that are causing the discrepancy. If filters are set up to exclude certain data, your event counts may not match.
3. Data Precision: GA4 only provides a sample of data rather than the full dataset when your website has high traffic. This might affect your results causing them not to tally.
4. Event Parameters: Ensure that the event parameter (transaction_id) used to setup the custom events is capturing all the required data.
To get a definitive answer, I suggest going through your GA4 setup again to make sure everything is correctly configured, give it some time for data processing and then recheck the numbers. If the issue persists, you may want to reach out to Google’s support community.
-
Logan
Member15 March 2023 at 12:34 am in reply to: Troubleshooting Incompatibility Issues with Google Analytics 4 Reporting in PythonThe error message you’re facing is essentially saying that certain combinations of metrics and dimensions won’t mix and match. It’s kind of like trying to combine two puzzle pieces that don’t fit together.
In your scenario, eventCount doesn’t vibe with
campaignId
orcampaignName
. To get your request going, you may need to let go of eithereventCount
,campaignId
orcampaignName
.This basically means that the exact data combo you’re trying to cook up may not be on the menu. But no worries, this happens and there could be alternative ways to gather the insights you need.
-
Logan
Member27 January 2023 at 9:57 pm in reply to: Resolving Self-Referral Problems in Google Analytics 4 (GA4)This issue could be due to the analytics tool taking some time to update. It’s also possible that there’s a misconfiguration or error with the way you’ve added your site to the ‘unwanted referrals’ list. The missing referrer information may be caused by visitors using web browsers with strict privacy settings, thus preventing the sending of referrer data.
-
Logan
Member8 January 2023 at 8:46 pm in reply to: What plugins exist in Ionic framework for integrating google analytics 4?Yes, as of July 1, 2023, Google has stopped sending hits from Universal Analytics to Google Analytics 4, so users must transition to the newer version of GA4. Aside from the React plugin for GA4, there are other plugins that are compatible with Google Analytics 4. For instance, Gatsby, a popular static site generator that’s built on React, offers plugins that are compatible with GA4. Further, there are also a number of WordPress plugins that support GA4, including “MonsterInsights” and “ExactMetrics”. JavaScript frameworks like Angular and Vue also have libraries that can integrate with GA4. But, it is always a good practice to review the integration documentation and ensure the current compatibility because these aspects can frequently change.