Mobile app version of vmapp.org
Login or Join
Angela700

: Google Analytics - exclude from stats if user clicks on a particular link when visiting home page I have a website for a web application which our company has built. Let's say the domain is

@Angela700

Posted in: #GoogleAnalytics #Tracking

I have a website for a web application which our company has built. Let's say the domain is www.example.com/
Many of our customers have bookmarked this. The navigation for the site features various URLs (all relative to www.example.com/). However, one of the links in the navigation is a URL to the web application login page, which resides on a subdomain, app.example.com/login.php
We have Google Analytics tracking code on example.com (but not on app.example.com).

What we're trying to do is figure out a way to exclude traffic in our stats for example.com if the user goes to the home page, and then immediately clicks on the application login link - in other words if the user visits www.example.com/ and then immediately clicks the link in the navigation that takes them to app.example.com/login.php.
Does anyone know if it's possible to do this?

The reason we want to do it is because it skews our statistics - for example it looks as though we get thousands of visitors to the home page of our site each day. Whereas in reality we think people have bookmarked it, go to it, and then immediately go to the login page on the subdomain.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela700

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murray432

You could create a custom dimension at session level scope, set its value to Logged In (or something similar). Then create an onclick event for the link app.example.com/login.php and send the custom dimension along with it.

The custom dimension value Logged In could then be used to filter these visits out of the reports as the custom dimension would apply to all hits within the same session.

Custom dimensions are set at the Property level. Information for how to create them is available in the GA Help Center
support.google.com/analytics/answer/2709829?hl=en#set_up_custom_dimensions
Then create an onclick event and send the custom dimension along with the event.
eg
<a href="https://www.example.com/" onclick="ga('send', 'event', 'link', 'login', {'dimension1': 'Logged In'});">Link to login</a>

Change dimension1 to reflect the index number provided in the CD table in GA interface after you create it eg if the index no. is 15 then change it to say dimension15
developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets#sending_data

10% popularity Vote Up Vote Down


 

@Gloria169

Yes you can. Create a Event Category for External Links, Event Action : Href URL, Event Label : Label of link

Then create a Custom Report with Page Dimension with User Metrics (or what ever Metrics your want) > Create a Filter to "Exclude Event Action" that "regex matches" that "login href url" AND another Filter to "Include Page" that "regex matches" your homepage, thus the report which will exclude all events that have the login url.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme