All Questions
Tagged with google-analytics javascript
3,829 questions
3
votes
2
answers
112
views
Setting up user id in Google analytics with Google tag (gtag.js)
I have a user set up as follows with Google tag, gtag.js:
<!-- Google tag (gtag.js) -->
<script async src='https://www.googletagmanager.com/gtag/js?id=G-Lxxxxxxx'></script>
<...
0
votes
0
answers
26
views
gtag is not sending custom event when redirecting to external page
I want to track when user clicks on the button which redirect to external page.
Implementation:
gtag("event", name, {
event_callback: () => onLinkOpen ? onLinkOpen(link) : window....
0
votes
0
answers
40
views
Classic ASP & Google Analytic : How do I set up the tracking properties for my website
I'm maintaining a classic asp website and I'm trying to implement Google Analytic on one of the pages. And I have 2 types of javascript codes, which I used inside my classic asp.
With [Code 1], ...
1
vote
2
answers
58
views
Load GA4 script from specific component in angular
I am working with angular v12 to build a web page that will be user with different clients, and i can tell the difference between clients based on a query param (realm) which is unique per client, and ...
0
votes
0
answers
43
views
INVALID_ARGUMENT in Google Analytics
Unable to retrieve event parameters associated with events.
I am integrating Google Analytics into my website and trying to fetch events using the Analytics Data API. However, the parameters I sent ...
0
votes
1
answer
122
views
How to send custom data in google analytics default GA4 events
I am using Google analytics in my angular project. Initially I simply added the google analytics reference in my index.html and was collecting the default event data like page_view. Recently I started ...
0
votes
0
answers
169
views
How to send Google Analytics 4 e-commerce events using @next/third-parties/google package and sendGTMEvent function in Next.js?
We have a Next.js app that uses Pages Router. For the purposes of analytics, we implemented GA4 via GTM. This works fine for basic (and enhanced) tracking, but we need to send specific e-commerce ...
0
votes
0
answers
32
views
How to listen to Enhanced Measurement events from js?
I want to pass Enhanced Measurement events from Google Analytics through an iframe. Specifically I want to capture events, such as form_start and form_submit, etc and then send them to the parent ...
0
votes
1
answer
329
views
Hashing with sha256 when sending user_data to GA4, Google ads, etc
tl;dr: Should there be a sha256_ prefix to city, regon, postal code, country, and should I hash them or not?
---- details
I am wondering wether google doesn't consider city, region and postal code a ...
1
vote
1
answer
158
views
How can i calculate the average of a custom event value on GA4?
i have login time for multiple users and i want to show the average, min and max of the login time. how can i do that on GA4 ? following is my code:
gtag('event', 'login_time', {
event_category: '...
0
votes
1
answer
168
views
Reducing blocking time of GTag script
If you can recognise this:
<script src="https://www.googletagmanager.com/gtag/js?id=G-TOKENIDHERE"></script>
It is a heavy file for the first second and so it matters.
What I ...
0
votes
0
answers
210
views
Sending custom event to GA4 via GTM without listing all its attributes
I want to track custom events in GA4 via GTM. I have setup a GA4 custom event tags which works fine. See screenshot below for example, it's not 100% correct to be working as described here but it's ...
0
votes
1
answer
209
views
Trying to understanding advanced Google Tag Manager setup with custom tags and variables
I'm a marketing professional who has been doing basic tagging and analytics for clients. I've encountered an account set up by someone with extensive development/analytics knowledge, and I'm ...
0
votes
0
answers
72
views
JavaScript: Firebase Analytics don't log my events in console
I'm newbie to Firebase Analytics Web implementation.
But here's my code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
...
0
votes
1
answer
109
views
Google Analytics from a third party script
I am developing a widget that can be added to a host website via snippet of js code that once rendered will add an iframe to the host website.
Now my customers want to give me their GA tracking id so ...