How can I track HTTP and HTTPS traffic details separately from Google Analytics.

  • Welcome to Webmasters! When you create a property in GA, you enter either HTTP or HTTPS. Each are considered different websites by Google regardless of whether they are actually the same site or not. Do you remember how you created your properties? Cheers!!
    – closetnoc
    Oct 3, 2019 at 15:41

1 Answer 1


As far as I know, once the data gets to GA you can't do anything based on protocol - although you can set http or https for your property, that does not cause any filtration to happen, and there are no dimensions include the http(s) part of the URL to use in segments or in filters to include or exclude traffic from different Views.

(This is unlike Google Search Console, where protocol does matter.)

If you use Google Tag Manager to send data to GA, you have more options. First, you could split the traffic and send it to two different properties, with a Custom Javascript variable for your tracking ID. This would contain a function like the following:

function() {
  if ({{Page URL}}.indexOf('https://') === 0) {
    return {{SSL GA ID}};
  return {{Non-SSL GA ID}};

To keep the data in one Property, you could use a Custom JS variable in GTM to set the value of a custom dimension based on the protocol, or to add an identifier to the page name or page path depending on protocol. [Custom dimensions must be set up on the GA end as well, under Admin > Property > Custom Definitions.]

With either a custom dimension or an alteration to a built-in dimension, you'll be able to separate out SSL and non-SSL traffic in a custom report or segment, or by creating Views that include only one of the two kinds of traffic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.