Nibbles & Bits

Measuring IPv6 Traffic with NodeJS and Google Analytics

by | November 9, 2018

I was gonna tell a ipv4 joke aaand it's gone.

Some Questions That Keep Us Up At Night

Recently we found ourselves wondering – how many of our website’s visitors are capable of utilizing IPv6 traffic? Of course, there are a number of places out there where you can see global IPv6 adoption rates [link] and other IPv6 statistics. But, we wanted to see what the traffic looked like out in the wild on our own site. Here are some questions we wanted to answer:

  • Is most IPv6 traffic on mobile or desktop?
  • What brands of mobile devices are most likely to use IPv6?
  • Which countries are bringing the most IPv6 traffic?
  • Are there any noticeable behavioral differences between IPv4 and IPv6 traffic?


Enter Javascript

To answer these questions, we created a simple JS script which sends a GET request to a domain with an AAAA record (IPv6 address only) to see if the client supports IPv6 traffic. If the request fails, it sends another request to an IPv4 domain so the server can record how many clients do and don’t support IPv6 traffic. We created a small GUI to report the results.

We’re putting the code online with instructions for implementing this on your own site:

There’s also a separate GUI for showing the results which can be found here:

We also send an event to our Google Analytics account so that we can segment our Analytics reports based on whether the traffic was or was not IPv6 capable. This lets us answer some of the more interesting questions mentioned above.

The setup for this is simple – for each pageview we send a Google Analytics event labeled either IPv4 or IPv6. We then create custom segments matching those labels so that for any report in Google Analytics we can divide the traffic based on the user’s IPv6 capability.

Initial Results

Here’s our GUI for viewing the raw results

IPv4 vs IPv6

Interestingly the ratio of IPv6 to IPv4 traffic on our site is nearly identical to the global adoption of just over 25%. Substantially more of the IPv6 traffic is on mobile devices as compared to IPv4.

IPv4 vs IPv6: Most Common Device Brands

Looking at Google Analytics we see some differences in most common device brands between IPv4 and IPv6 traffic. In particular, Samsung has a larger percentage of IPv6 traffic than it does IPv4.

IPv4 vs IPv6 most popular mobile brands

IPv4 vs IPv6: Most Common Web Browsers

IPv6 traffic appears to come from a broader range of browsers than IPv4 which is completely dominated by traffic from Google Chrome.

IPv6 vs IPv4 Browser Usage

IPv4 vs IPv6: Most Common Countries

We also looked at countries for both IPv4 and IPv6 traffic and noticed that the United States has a larger share of IPv6 traffic. This matches our expectations based on global adoption.

IPv4 vs IPv6 Country Comparison

Spotting Bots

We also noticed a spike in IPv4 traffic that did not have a corresponding spike of IPv6 traffic. We would expect organic spikes in traffic to affect IPv6 and IPv4 traffic similarly, but all of this traffic was over IPv4. After digging in a bit more we realized that this spike of traffic came from a network of bots. It gave itself away in part because none of the traffic was IPv6 capable.

IPv6 vs IPv4 Bot Spike

What’s Next

It’s been fun setting this up and measuring the results on our own site. Are there any other questions that come to mind? What else could we measure using this approach? Take a look at the code and let us know if you have any questions or ideas.


“We decided to move our rather complex IP address and DHCP management process to ProVision and it has worked out great for us!! The team at 6connect were very flexible and went above and beyond to accommodate our requirements and helped to make the migration as smooth and hitch free as possible. Kudos to the team @ 6connect!”

Premkumar Subramaniam
Head of R&D

“We are excited to be partnering with 6connect to leverage their technology and talent. We particularly admire their long-standing IPv6 contributions and their ability to service and support customers in this area, some who are the largest service provider in the world. The 6connect executive leadership team and technical team are great to work with and we look forward to many partnered projects to help customers address their Cloud, IoT and Security needs with IPv6. Automation, workflow and orchestration are critical to the success of most of these projects and 6connect is well positioned to help our mutual customers in those areas.”

Ed Horley
Co-Founder & CEO

“Enterprises can struggle managing purposefully segmented DDI architectures with any agility. Our partnership with 6connect empowers customers with complex infrastructures to move faster to service the business while consolidating visibility and control over their estate.”

Andrew Wertkin
Chief Strategy Officer,

“6connect’s approach to automation addresses quite a few challenges with physical and virtual networks – how to improve the agility of your current network infrastructure without sacrificing reliability and adoption of future network technologies.”

Pär Lange
Investment Director

“A customer is looking for an integrated solution from a single vendor for both IPAM and DNS. Through the 6connect reseller program, Secure64 is able to offer the most secure DNS solutions married to a unique combination of IPAM and resource provisioning that customers want. It’s a marriage made in heaven.”

Mark Beckett
VP of Marketing

“A huge benefit of working with the 6connect team is that they devoted a lot of resources to get our products integrated so we had the turnkey solution that we could take to market. It was very easy to work with their team to get product integrated and successfully launched.”

Mark Beckett
VP of Marketing

You have IPv6!

You’re on IPv4.

Explore ProVision Suite

Resource Controller



DHCP Controller

Peering Controller


Talk to one of our Engineers