Modify Google Analytics Script To Only Cookie U.S. Sessions
-
I know I can filter sessions from outside the US, but is there a way to modify the GA script so that it doesn't cookie visitors to a site if they are from outside the US?
Note, this is separate from having a cookie consent opt-in.
Thanks in advance,
Fitz -
I'm running a game blog and hosted on Wordpress. I'm also facing the same analytics problem. Check out my website stat.
-
Hey, thanks for the response. Legal department wants to eliminate all tracking of EU visitors to their US site (i.e. no Google Analytics cookies/tracking). They already have GDPR and cookie consent implemented, but as far as legal is concerned they want no risks so they wanted to know if GA could be altered to not track site visitors from the EU while still tracking all other site visitors.
Since they don't want to block visitors from the EU from being able to visit the site and I'm not aware of a way to tell GA not to cookie visitors from specific locations, I thought I would ask if there was a way. Right now best solution I have is to redirect EU visitors to a newly created landing page (or microsite) which doesn't contain GA script. That way they can still learn about services, but there is no risk of GA tracking and they can't hit the main site where tracking is enabled.
Any better ideas are welcomed.
-
As the question is interesting, I went to search and I did not find anything that explains hoot legitimately modify the GA tracking script. May I ask you why do you want the script to not cookie non-US visitors to your website?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Techy - Google Analytics, Google & Code Expert
We are trying to find someone to join our company but are having a very difficult time. Does anyone have any suggestions about where to find someone like this?
Reporting & Analytics | | ColoradoMarketingTeam0 -
The best way to track internal links in Google Analytics
Hi there, we are a retail business and we have invested in quality editorial content which sits in our Blog at ourwebsite.co.uk/blog/ The Blog links to the main site (an online store) and I want to track the 'value' of the blog by how many clicks the blog content generates back to the main store. At the moment we're using this code on the end of every link in the Blog: ?utm_source=Blog&utm_medium=Widget&utm_campaign=FromBlog Does this affect SEO and is there a better way of doing it? Thanks.
Reporting & Analytics | | Bee1590 -
Query on google analytic benchmarking report
Hi All, First I select My Industry Vertical - ABCD then I select Region - US ( all region) then size by daily session - 10000-99999 finally reports appears "Blank" but when I decrease daily session from 10000-99999 to 1000-4999 or less then report is perfect. So what does it mean? My Avg daily session is 70k to 80k. So how to analysis benchmarking in this case? Thanks!
Reporting & Analytics | | pragnesh96390 -
Tasks for Google Analytics training
Hi Mozzers, I'm delivering some Google Analytics (Fundamentals level) training, and trying to make it was fun and as interesting as possible... which is quite a challenge when it comes to GA. I was just wondering if you're aware of training tasks, or interactions, I could bring into this kind of training session? The group are particularly interested in user journeys and the effectiveness of content. Thanks!
Reporting & Analytics | | A_Q0 -
Potential Security Issues Installing Google Analytics GTM
Greetings MOZ Community!! My SEO firm plans has requested that Google Analytics GTM be installed on my website to better track goals and events. My developer will be responsible for installing the GTM script on my website and the SEO firm will actually configure GTM to track goals. Is anyone aware of GTM causing server errors/issues when installed? My developer claims that running GTM would create additional vulnerability to hacking. Is anyone aware of potential security risks from running Google Tag Manager? Once Google Tag Manager is installed, will it make the site more difficult for my developer to administer? Will there be increased risk of the code breaking? Overall, is GTM a big improvement over the existing version of Google Analytics? Is it worth the effort to install? My SEO firm is very much in favor of this upgrade. I would like to move forward provided there is no major downside. I look forward to feedback. Thanks, Alan
Reporting & Analytics | | Kingalan10 -
Keeping Google Analytics Data when Moving to Subdomain
Hey All, Against my objections a client has decided to move an existing site into a subdomain while putting up a new site on the main domain. My question revolves around Google Analytics, how do I make sure that I don't lose historical data on the domain before it moves to a subdomain? We're going to be doing a redesign of the old site and I need to keep the historical data so I can prioritize content. What do I need to do? Or will Google analytics recognize the URL's and still attribute the data to those URL's or will I have a separate set of data based on the new URL (with the subdomain). Any insight would be appreciated! Thanks!
Reporting & Analytics | | EvansHunt0 -
Google Analytics
How can you see the conversion rates for the referral traffic? For example I want to see if any of the facebook visits to my site resulted in a purchase.
Reporting & Analytics | | EcomLkwd0 -
How to track affiliate ads on Google analytics
Hi Im new google analytics user, I would like to track affiliates ads (banner flow -javascript) on my website. How to set up goals to track affiliate ads? thanks.
Reporting & Analytics | | info_tipovanie-stavkovanie.com0