The Google Analytics Vote For Trump Analytics Spam - google-analytics

We were checking newly implemented Google Analytics for our mobile app and surprisingly there are a lot of visitors from multiple countries but in actuality, we haven't released our app for any store and it's just beta between 5 main users.
After checking Google Analytics report in details we have found that it got spammed by Bot call "Trumps Bot" when something happens on your account you can see following lines in your language section.
“Secret.ɢoogle.com You are invited! Enter only with this ticket URL. Copy it. Vote for Trump!”
There are a lot of solution available to avoid this data in your reports using the filter but i was just wondering if there is any concrete solution on permanently remove this data from my reports and also is there anything we can do to avoid such data in future as its seriously affecting business strategy.

Due the tecnology used on Google Analytics the only way to eliminate this referal is using a filter, check one common point of all this hits . In this case is a hard one, because all the parameters changes , exept for the language, for a well know reason, to see the spam.
So try to use this one, in my case works
I highly recommend you read the community policy, this can be considered as off-topic question

Analytics spammers are always trying to find new ways of getting attention, and with this one, this spammer hit it big.
It is not possible to permanently remove it unless you delete the whole property. But you can create and advance segment to get a clean view.
But the most important part is blocking it so it doesn't pollutes your data. For this particular type of spam you should create a custom exclude language filter with this expression:
\s[^s]*\s|.{15,}|.|,
That expression will block any hit that doesn't use a proper language. That combined with a valid hostname filter should prevent most of the current spam and save you a lot of headaches.
If you need help, you can check this step by step guide for building these filters and creating the advanced segment to remove it from your historical data.
Here is also a related question.

Login in to Your Google Analytics account
Select ADMIN Section
Click on All Filters -- Add Filters
Give a filter name such as -- Include only website traffic
In Predefined section, select  Include Only
for more... Click Here

Related

Is it possible to selectively delete data (specifi page URLs) from Google Analytics?

I'm pretty sure the answer to this question is "no", but I would like to get a definitive answer from an official source, and also understand what my alternative options might be.
Long story short, my app has old data in it that used to include user email addresses as a GET parameter. Those URLs are showing up as unique page view URLs in Google analytics, like this:
I don't want to be recording email addresses in my Google Analytics account (for privacy reasons), and I have fixed the code that was causing this in the first place, but I also want to delete or scrub the old data that currently exists in Google Analytics.
From everything I've read, it doesn't sound like this is possible without completely deleting the property, maybe even the account?
To be clear, I am NOT interested in creating new views that don't include URLs with email parameters in them, or otherwise change the view and not the data. The data needs to be gone and be completely inaccessible to anyone with access to this Google Analytics account.
Here are the options I've come up with:
Delete the property and start over. I'm pretty sure this will
actually delete the collected data, but it's not clear to me if I
would have to actually delete the account itself to achieve that.
Set the data retention time to the lowest possible value (looks like 14 months right now) and wait 14 months for it to go away https://support.google.com/analytics/answer/7667196?hl=en
Perform some kind of magic to get in contact with an actual human at Google who could help me scrub or remove this data.
Does this sound right? Are there options I'm missing? If there's a way to do this through a Google API that would not be a problem.
If this is still a relevant issue. GoogleAnalytics provides a way to delete some data. Universal Analytics https://support.google.com/analytics/answer/9450800?hl=en and GA4 https://support.google.com/analytics/answer/9940393?hl=en&ref_topic=2919631
You are right: changing the data, that you have collected, and Google Analytics have already processed, is not possible. You have the option to make changes during processing with various filters, e.g. Search-and-replace filters, but as it is written in this official support article:
Like all filters, search-and-replace filters only apply to hits
collected after you've applied the filter to the view (filters cannot
change historical data).
Regarding you suggested options:
Deleting a view or property will result in a permanent loss of data after a 35 days period of waiting time. (While this could be undone.) So unless the requirement of scrubbing the collected PII is more important than having your historical data, this should not be a way to go. The same applies to deleting the whole account, so it would be enough to delete affected properties or views.
From the article you have linked as well, you can see, that data retention is about removing user and event level data, and it will not affect the data in aggregated reports. My understanding is, that an already created, page level report will keep showing the page with an email address:
Keep in mind that standard aggregated Google Analytics reporting is
not affected.
I hope these references help you to evaluate your options. Sorry for not being able to come up with a solution, but the basic concept is, as highlighted in this Google article:
Once Analytics processes the data, it’s stored in a database where it can’t be changed

Source and medium as hidden fields in a form

I asked this question in other forums, and didn't have a solution so far.
I would like to have Google Analytics' source and medium added in every form sent by my websites, as hidden fields.
I use WordPress, and the plugings that I commonly use for contact forms are Contact Form 7 and Fast Secure Contact Form.
Any ideas?
Thanks in advance!
-- Gabriel
There isn't really a way.
It used to be that channel attribution was computed in the GA tracking code in the client, and you could extract it from the cookie values. However since Google has switched to the measurement protocol (which is what's behind both analytics.js and gtag.js) attribution is determined on the Google servers and there is no really feasible way to get the information in realtime to include it in a form.
You could create a script that emulates GA attribution, but the rules are somewhat complex and it is unlikey you would get an exact match.
Another way (which, if you are in Europe, might bring you in conflict with the new privacy guidelines from march on) would be to save a unique token with the form, send the same token as custom dimension to Google Analytics, and then join the information after the fact via the API. Some time ago I described the process in a tutorial, and even if this is for salesforce (and the specific code most certainly obsolete) it describes the problem and the solution somewhat exhaustively.

Wondering how to achieve this (sharing WP page via email and tracking it)

So the following which I'm writing is just to discuss whether something like this is even possible or if any of you would have any better ideas/suggestions or understanding how this might work. I thank anyone who takes time to read this in advance and I hope I don't explain myself too incoherently:
Let's say I have a page in WordPress which has a little bit of text and a video. Basicly I would like to share that page's link or I'd want to forward that page via e-mail to a certain group of people (let's say 10-50 specifically chosen people) and I want to track who of them opened the link and for how long they were on the page or watched the video.
I would like to make this happen in a way that I wouldn't have to make 50 different pages or 50 different URLs for each person (or 50 different tracking strings for that matter). Or that I wouldn't have to take a newsletter-mailer type page in between this process.
Basicly, I would like to make the sharing/forwarding and analytics overview process as easy as possible, so that an admin or moderator wouldn't have to check too many different pages to get the info.
I really appreciate any and all feedback.
[Also really sorry if I posted this in the wrong place. Please feel free to redirect me to a corresponding slot].
Technically, Google Analytics isn't meant to be used to track this specifically- it's typically meant to track groups of anonymized users. That being said, it is capable of doing this (but may not be as automated as you had hoped).
You are correct in thinking that you'd either need to duplicate the pages or create multiple different campaign URLs.
The other thing to keep in mind is that as emails are forwarded, there is no way to update the URL after the email has been sent, so if you email me and I forward it to someone else who clicks through, you're going to think someone else is me.
One way around this would be if you know your users IP addresses (not only is that a big "if", but it can also be spoofed), or some other uniquely identifying feature (any chance these people have signed-up through your website and have actual user IDs? That'd make things infinitely easier!).
Maybe you could customize the email to add their email address as a query string? That could still require a lot of work (and you couldn't just share a single link).
Now, you can not store personally identifiable info in GA (including IP and email addresses), but at the server-level you could assign a custom dimension with a uniquely generated ID and send that to GA. Now you've got all the info you need!
Unfortunately this method only works if you can detect some kind of "fingerprint" of your users.
Unfortunately what you described isn't quite what Google Analytics was designed to do. If you wanted to get into detailed user-specific tracking, I'd advise you look into a CRM. Those systems are designed specifically for user tracking as you described.
Hope that gets you pointed in the right direction.

How to filter all Google Analytics reports for a specific search term

I'm trying to create a filter on a Google Analytics profile. I'd like it to include only traffic that has come as a result of searching for a specific search term.
For example, imagine I'm interested only in people who have arrived at my site having searched for the word 'dog'. I don't care about any other visitors, so I want all my reports to be filtered for people who have searched for 'dog' to get to the site.
I have tried this a few ways, but I'm not convinced they're working. My latest attempt was the following:
Edit filter
Filter type: Include
Filter field: Referral
Filter pattern: (\?|&)(q|p)=.dog.([^&]*)
Case sensitive: no
At the moment, this appears to be letting through traffic that has not come from a search engine. It would be great if someone could explain what I need to do to get it to work correctly!
Many thanks,
Katie
[P.S. I realise this may sound like a strange request, but it's partly to help me learn a bit more about filters]
Add another Include filter where medium=organic
You could also do it using Advanced Segments instead of requiring to setup a new profile for each keyword :-)

Best way to generate an automated report in Google Analytics for a specific collection of URLs

Currently using Google Analytics as a supplement to our paid tracking software, but neither of them are giving us exactly what we need.
I have a list of about 60 or so urls (out of about 1500) on the site that I wish to setup a monthly report for that can be emailed to multiple recipients. I can't seem to figure out how to create a report showing just the hits on these 60 urls, I can apply advanced filters on the content page but those disappear after a while and sometimes error out when adding too many URL's.
Is there a method I'm missing in Google Analytics to achieve this goal or am I better running an SSIS package to pull the URL's from the API and formatting a document that way?
Yeah, advanced filters are not really designed for this kind of thing.
Here are some things which may work for you:
Try setting up a new GA Profile with an Include filter to filter only the URLs that you want to report on. You can use a regular expression to identify the 60 URLs. Then these will be the only URLs tracked in that particular profile.
Try setting up an Advanced Segment to select the Pages using a very long "OR" filter.
You could set up a new GA account and log the URLs into that account with additional tracking code. This is not really recommended as the 2 accounts will share tracking cookies.
Use Excellent Analytics to pull down data into Excel for the URLs in question using the GA Export API.

Resources