How to disable certain fields in Firebase Analytics? - firebase

I use Firebase Analytics and the URL (aka page_referrer in analytics) might reveal which user is behind the event. Can I somehow disable certain fields in an event like page_referrer?
Check this example below. page_referrer is localhost because of my development environment. But I can see the full URL which could reveal from which user this event is.

Related

how can I validate if good analytics is counting review with ajax request

I have installed the google analytics in our e-commerce site using google tag manager. From the product detail page you can click on the colors to see the same product in the different colors. I implemented this using ajax so the page load is not required. I was curious if the google analytics will count as multiple reviews a user clicks on the different colors or do I need to explicitly call something in order for the GA to count as multiple reviews.
First of all, that depends how and what kind of GA you've implemented.
To implement analytics, you have to specify a trigger for the analytics tag. That trigger normally determines if a tag is fired or not.
If you used a page load trigger, then the tag will only be triggered on the real page load. And it won't be triggered on your ajax manipulations.
With only one exception: if you used the GA4 config tag, you had this checkbox there:
The checkbox doesn't only send the pageview on config load, it keeps sending pageviews on every history change. Therefore, if your ajax causes history change and you use the GA4 config tag, then you're getting pageviews.
But this is theory. You can just go and check. Open your network tab, filter the request by collect and see what's sent when. Or alternatively, install the adswerve datalayer debugger and it will log whatever is sent whenever it's sent into the console in a very neat, clean way. This is how it works on this page:

How to create a Google Analytics report on a specific query string?

I have hunted around a bit and only found how to setup the site search parameter in a site's admin section. This is not what I want. Also looked through some Google Search Console videos - no go.
Given a URL, https://somesite.com/redirect/?redirect=https://gofundme.com/somecampaign/.
As some background, what I have setup here is a simple page that says "Loading..." and is used for external links I want to track analytics on, from platforms that I may not have access to the link's analytics. For example: https://gofundme.com/somecampaign.
Rather than having a redirect setup on the page itself, I injected custom JavaScript through Google Tag Manager that records analytics data in Google Universal Analytics (anyone want to recommend how to do this in G4A?) then performs the redirect.
My question is, in Google Analytics, how do I setup a custom report where the query string parameter = redirect and/or the specific page URL?
Thanks.

Hotjar & Google Tag Manager (GTM) with virtual page views

I have set up our Google Tag Manager (GTM) account so it sends virtual page views to Google Analytics (GA). This boiles down to pushing a custom event on the dataLayer (= GTM) array which will then trigger sending a pageview to GA. This works fine.
The same GTM account also has Hotjar connected to it, and I'm searching to send the virtual page view also to Hotjar. However, I can't seem to find any documentation about this. Hotjar does support it, but they only talk about doing it via their own "hj" function, and I'd rather do it via GTM.
Based on their official documentation they saying that Hotjar will track page views automatically if you changing URLs in your single page application.
If you SPA changing only fragments, then you need to use this setting "Track changes automatically, including fragments"
If you want to send analogue of "virtual page view" to Hotjar, then you should execute in your GTM:
hj('stateChange', 'some/relative/path');
You should be able to use hj and function should be already defined when GTM is triggering tag.
If you want detailed answer specific to your website, it will be better to share the link to website and the way how you currently configured GTM to track virtual page views

Tracking Email Opens with GTM Event

I'd like to trigger an event to identify when an image has been served upon visiting a site.
The goal is to use this event for email open tracking. I already have a tracking pixel embedded in the email that served from my website each time the user opens the email.
I have the event set up to store the 'Label' = a variable that contains the query string from the URL referre. This should in theory capture the utm parameters from the URL, for example:
website.com/1x1tracker.gif?utm_source=email&utm_campaign=emailcampaign1&utm_content=welcomeemail
Where I am getting stuck is the trigger for the event. For a normal image viewing event I could just do something with an 'Element Visible' trigger and be done with it, but since the image is requested from the website via the email client, no one actually visits the site.
Curious to hear thoughts on how I can get this event to be triggered by someone opening the email and having the request for the image sent to my site.
Thank you!
You won't be able to track email opens with GTM since it only works in a DOM environment and requires some Javascript to run on the page.
However, you can send events to Google Analytics through Measurement Protocol based on the parameters in your pixel URL. Google provides a sample code to do that on the help pages.

How to capture if a visitor is from a google adwords click

When a user signs up on my site I want to be able to store whether or not they came to my site via an Adwords campaign.
I know google uses javascript to track conversions based on a cookie that is created on the users machine. Is there a way I can check this cookie so I can store the source against the user account?
You're correct--you can read this data from the cookies.
To configure the tracking:
connect your adwords and GA
accounts:
in your AdWords account, go to My
Account > Account Preferences, click
the "edit" link next to Tracking
then select the box that says
"Destination URL Auto-tagging".
Click "Save Changes";
still from your AdWords account,
click the Analytics tab and choose
Analytics Settings > Profile
Settings > Edit Profile Information;
check "Apply Cost Data", then click
Save Changes
So how can you tell if it's working? And where does GA store the data?
Grab an initial __utm.gif request and look at the Referer. Appended to the URL is a new parameter "gclid." This is the keyword-specific parameter (unique to your account). It's this parameter that distinguishes your visitors as AdWord-originating (i.e., "google(cpc)") from "google(organic)" Here's one i just grabbed and anonymized (scrambled the numbers/letters):
Referer: http://www.adomainname.com/?gclid=CKr61p31yKACFZlg4wodjj3gbA
You'll see this identical string in two other places in the same tracking pixel request:
(i) as the value for the GIF Request Parameter "utmp" which is the page request for the current page, and, most importantly;
(ii) as the value for the GIF Requests Parameter "utmcc"--the container for the cookies. The specific cookie that holds the adwords data is __utmz, which is actually the container for all referral data. Here's an anonymized example i just grabbed more or less at random (i.e., i just did search in Google using a query comprised of obvious Adwords and then clicked one of the paid links in my search results, then just pulled the Request Header):
utmcc=__utma%3D755416178.1576730350.1269876846.1269143846.1269143846.1%3B%2B__utmz%3D219726107.1269143846.1.1.utmgclid%3CKr61p31yKACFZlg4wodjj3gbA%7Cutmccn%3D(not%2520set)%7Cutmcmd%3D(not%2520set)%7Cutmctr%3Dhomes%2520for%2520sale%3B
HTTP/1.1
You could add an additional url parameter to the url you gave at google adwords, and check for it on your site and store in a session variable or cookie.
At registration of a user account check for this session or cookie you have created and act accordingly..
I know this already has an accepted answer but it's very out of date. The updated way can be found here: https://support.google.com/analytics/answer/1033981?hl=en
C+P'd:
In order for Analytics to display details about your AdWords keywords
and costs, you must do one of the following:
Enable auto-tagging. This is the recommended approach and ensures that
you get the most detailed AdWords data. Manually tag all your keyword
final URLs with tracking variables. You should only do this in the
special cases outlined below.
How auto-tagging works Auto-tagging automatically imports AdWords data
into Analytics. Combining AdWords data with the rich post-click
information provided by Analytics allows you to see what happened on
your site after people clicked on your ads.
When you enable auto-tagging, a parameter called gclid is added to
your landing page URL when a user clicks over to your site from an ad.
For example, if your site is www.mysite.com, when a user clicks on
your ad it appears in the address bar as:
www.mysite.com/?gclid=123xyz
Enable auto-tagging To enable/disable auto-tagging:
Sign in to your AdWords account. Click the gear icon, and select
Account settings. Make sure you're on the Preferences tab, and click
Edit in the Tracking section. Select (enable) or clear (disable) the
Auto-tagging checkbox. Click Save changes.
You could always provide an adwords-specific landing page. That way you have a lot freedom to do whatever you want with the incoming adwords user...

Resources