![how to track ip address in google analytics how to track ip address in google analytics](https://mixedanalytics.com/blog/wp-content/uploads/ip-address-ga-img4.jpg)
- #HOW TO TRACK IP ADDRESS IN GOOGLE ANALYTICS HOW TO#
- #HOW TO TRACK IP ADDRESS IN GOOGLE ANALYTICS CODE#
Useful for triggering form submission trigger. This allows Tags to access to CSS classes used on the Form element on your website. Please refer to Google Tag Manager's document for more.įorm Classess is a standard variable available on Google Tags. Now create a new Tag which is going to register a new event and push to your Event dashboard on Google Analytics.
![how to track ip address in google analytics how to track ip address in google analytics](https://www.softwaretestinghelp.com/wp-content/qa/uploads/2020/01/What-is-IP-Tracker-tool.jpg)
In my Google Tag, I have created a trigger that fires when someone submits a form on my website. Pushing the Variable data to Google Analytics.
![how to track ip address in google analytics how to track ip address in google analytics](https://www.analyticscourse.net/wp-content/uploads/2018/02/You-can-anonymize-IPs-at-the-collection-phase.png)
Once you have saved your variable, now you should be able to see your variable under customer variables. Then give a name to your variable - IP Address Set the Variable Type to Data Layer Variable and the Data Layer Variable Name to bdc-ipaddress Retrieving the IP address value from the dataLayerĬreate a new Variable under variable Tab. The name of the variable will be - bdc-ipaddress This Tag will now fire on every pages and will push the website visitor's IP address to Google Tag's dataLayer.
#HOW TO TRACK IP ADDRESS IN GOOGLE ANALYTICS CODE#
The javascript code simply calls the API and pushes the IP address to Google Tag's internal dataLayer using the function:ĭataLayer.push() In the HTML Section, paste the following Javascript Code.Įnter fullscreen mode Exit fullscreen mode Set the Tag firing options to Once per event. Login to your Google Tag Manager and create a new Tag.Ĭhange the Tag Type to Custom HTML Tag and set the Triggering option to All Pages. You need to have some understanding of how Google Tags work.
#HOW TO TRACK IP ADDRESS IN GOOGLE ANALYTICS HOW TO#
In this article, I will only try to address the first aspect of problem - how to push IP address of website visitors to your Google Analytics dashboard. If I could use some advance IP geolocation to detect if the connection was proxy/VPN then it would add a lot of value to my web analytics.
![how to track ip address in google analytics how to track ip address in google analytics](https://sitekit.withgoogle.com/wp-content/uploads/2021/11/setupanewproperty-1024x785.png)
However, there are many ways to retrieve an IP address of your website visitor by implementing IP geolocation APIs or other native functions to access an IP address of the client.īut it could be so much better, if you could see an IP address on Google Analytics and tie that with your events so that you can check if the event was triggered from an authentic connection or not.įor example, I often receive a newsletter submission on my website and its difficult to access if the subscription was a spam or a genuine user. Unfortunately, the most popular web analytics tool in the world, Google Analytics, doesn't provide that information due to privacy concern.