In Google Analytics, it's easy to view the traffic from Twitter, Facebook or even Youtube. But it's hard to customize some traffic in specific situation, like other social networks that GA can't detect.
I can use JavaScript to detect some customized SNS (which might be not that popular like FB or Twitter) like:
if ( navigator.userAgent.includes('newFaceBook') ) {
ga.setSocial('newFB');
}
or
if ( window.location.includes('#someOtherSNS=1') ) {
ga.setSocial('NewSNS');
}
I used ga.setSocial to say what I want. Now I'd like to know, how could I do this?
If you want to add some social network (that GA can't detect) to report Default Channel Grouping - Social, navigate to Admin -> View -> Channel Settings -> Channel Grouping -> Default Channel Grouping -> Social
and set up additional conditions for social networks you want.
Edit access at the view level is needed.
Related
I am not sure of the best way to handle this, however I am sure it is possible to implement with Google Analytics.
I currently have 1 Google Analytics account with all the data.
I would like to create 3 additional "views" within Google Analytics to filter each part of my app accordingly.
The sections are:
the landing pages landing (sales pitch)
the application pages app (the product we offer)
the customer portal pages portal (the product we offer to our user which thier users view).
So dimensions/views (unsure of the terminology here) are;
landing app and portal.
Currently I am using code like the following;
function gtag() {
dataLayer.push(arguments)
}
window.dataLayer = window.dataLayer || [], gtag("js", new Date), gtag("config", "UA-XXXXXXXXX-1", {
custom_map: {
dimension1: "website_segment"
},
website_segment: "landing"
});
I was then expecting to see these values in;
View > Filters > Custom
However they don't exist.
Please note:
I do not wish to utilize separate GA accounts to achieve this.
I cannot utilize the URL scheme with regex to achieve this.
Custom Dimensions should be available in your list of fields when you're setting up a filter for your GA view.
It looks like you're sending info to GA with the code you provided, but have you defined the Custom Dimension in your GA settings? You'll need to do that as a first step.
Access Property > Custom Definitions > Custom Dimensions, add a custom dimension, and set the scope (you'll want a Hit scope for your use case). Then ensure your code is configured to send to the dimension you just created.
See https://support.google.com/analytics/answer/2709828#Lifecycle for an overview of Custom Dimensions - though it looks like the code snippets there are out-of-date, depending on which version of GA you're using.
As far as I understand your need, it absolutely seems feasible. You collect your data in one Analytics property, and you would like to create separate views for various site content, where content is identified by a custom dimension, instead of the page path.
First, make sure, you have enabled custom dimension 1 in your property settings. As you are collecting this data on hit level, you need to set the custom dimension to hit level as well.
Second, you need to deploy your code to send this data to Google Analytics. I assume, you can substitute the proper value (landing/app/portal) for the website_segment key. Please let me know, if this is also part of your question, how to assign the proper value to the defined custom dimension.
To check if data is sent, you can use Google Analytics Debugger Chrome extension, or you can inspect the call to www.google-analytics.com in developer console / Network tab, whether cd1 parameter is set.
To verify if data is available in Google Analytics, the easiest way is to open the Behavior / Content / All pages report, and to add your custom dimension as a secondary dimension for a period, which should already contain data.
Third, you need to create your new views and your filters within Google Analytics. Please note, that you won't see any available values here, but you can still select your custom dimension, and define a filter.
I've been trying to do a bit of research into this but am not really able to find a proper answer.
I have a number of ad campaigns for my site and I want to see where referrals are coming from and which ad campaigns are working best.
For example, I want to tell how direct email marketing campaigns are performing compared to one another. Normally I think most of these come up as 'direct' traffic in Analytics.
However, I want to know if there is some way I can change the URL's in the various ad campaigns like:
example.com?adcampaign=1
example.com?adcampaign=2
example.com?adcampaign=3
etc,
And then be able to see these in Google Analytics as referrals like Google, Facebook etc,.
Note:
I am using Google Tag Manager to handle advanced ecommerce tracking in Analytics
For future reference this is what is needed:
utm_source // the source it came from
utm_medium // the medium used
utm_campaign //the advertising campaign it is part of
ref: support.google.com/analytics/answer/1033863?hl=en
I have a question about filtering / segments in Google Analytics for a unique scenario with one of my clients. I essentially want to block a page URL forever out of analytics --- never see it counted page views, top pages, etc. What is the best way to do that?
Developers added a widget to my client's website which uses an iframe URL from their domain. This iframe is on 30+ different URLs which makes this URL seem like it is the #1 top page which is severely skewing their analytics. I am told there is no other way to do it - especially with the budget/scope of work - which means I need to find the best way to filter this out of Google Analytics reporting.
For instance, I am looking at "Behavior - Overview" - this iframe URL is #1. I know I can click into "view full report" and from there hit advanced and exclude this page to get the real results.
However, is there a top-level filter that can be permanently activated to block this page so you do not have to do the advanced filtering every time you are in Google Analytics?
Thank you for your help!
Just to confirm, your issue is this:
https://support.google.com/analytics/answer/1012049?hl=en
"Inflated number of pageviews"
If you just want to block it, would this not work?
In GA, go to Admin -> Filters -> Create new filter -> Custom -> Exclude by Request URL -> use the URI that you refer to.
I'd be interested to know if that works!
I had a question about Google Tag Manager. (I also felt bad for having the IT guy fix my mistakes on my simple click tag)
I wanted to track when a user enters a specific url when they click a link button on the homepage.
This is what it looks like
Image
This is my idea on what the Tag and Trigger should look like
Image
But I'm worried about having the trigger be fired when there is another page in the funnel
Also if the only way to do this is in the goal feature of GA that is good to know also. (I currently don't have the permissions here)
Thanks for responses
While it is difficult to achieve exactly what you're describing (it would involve storing data in cookies and then using these cookies to conditionally fire tags), there is a better way to achieve what I assume is your ultimate objective: an analysis of the shopping funnel.
Specifically, the Google Analytics enhanced ecommerce module has a dedicated report (the Conversions > Ecommerce > Shopping Behavior report) that shows you exactly this. It shows you the number of sessions for each stage of your shopping experience (product view -> add to cart -> checkout -> purchase) along with drop-off rates and volumes between each of these steps.
It is a little bit more involved to implement enhanced ecommerce but the final result is definitely worth it for an ecommerce business. Instructions for implementation of enhanced ecommerce (using Google Tag Manager) can be found here.
GTM is hit based without any notion of persistence. So by default this will not work.
You would need a custom HTML tag with a javascript function that sets a cookie, or writes a value to localstorage, when the button is clicked.
Then on your destination page you can check if the cookie exists and fire the tag accordingly.
I don't think the goal feature in GA can do that, either. A goal is registered when you hit a destination URL or event, you cannot specify conditions other than the destination.
So I 've discovered that all visits to my website by users who are using the Chinese social network, WeChat, have extra parameters after the landing page URL.
For example, most people who visit the page have this listed as the landing page URL:
/blog/zhou-youguang-the-father-of-pinyin/
However, anyone who visited from the WeChat Moments feature, has this listed as the landing page URL: /blog/zhou-youguang-the-father-of-pinyin/?from=timeline&isappinstalled=0
So it adds ?from=timeline&isappinstalled=0 to the end of the URL.
There are other extensions that WeChat may add to the end of the URL including:
/?from=timeline
/?from=groupmessage&isappinstalled=0
/?from=singlemessage&isappinstalled=0
Further in the "Acquisition Overview" section, it lists these visits, not under "Social", but instead under "Direct".
I want to use the filters feature in Google Analytics to put all of these visitors in the Social section and categorized with the social network WeChat.
Is this possible? How do I do this.
Thanks!
Update: I've written an article about “?from=timeline&isappinstalled=0” on Google Analytics. I've just explained what caused it, but I haven't been able to figure out how to organize these visitors with Google Analytics effectively. I'm still researching this. If you have any ideas for me to try, please let me know. Thanks!
It's easy, just add two advanced filters in GA:
1) WeChat Campaign Source fliter:
Request URI = "from=([^&]*)&isappinstalled=(0|1)"
Selete Campaign Source as Output, and set value to "WeChat"
2) WeChat Campaign Medium filter:
Request URI = "from=([^&]*)"
Select Campaign Medium as Output, and set value to "$A1"
Done, You can see it in action
You have to use the Channel Settings.
Go to Admin > View (the right column) > Channel Setting > Channel Grouping.
Take the "Default Channel Grouping" and take "Social". Here you can add the destination URLs from WeChat to the social channel grouping - like this: