What is Dark Social?
The channel Dark Social contains users who arrive to a website via a messaging app, and it’s currently incorrectly tracked in Google Analytics. Read The Atlantic’s post on Dark Social as a primer, otherwise you’ll quickly get lost.
Dark social is really just another channel so we’ll be changing how analytics groups users into channels. We will be creating a new default channeling grouping, so we can use our new channel in every Google Analytics report.
Create A Default Channel
The first step is to create a new default channel. By default Google identifies where a user came from using rules. The following chart shows how a couple channels are automatically grouped. You can find the other channels here. We will simply be adding one more row.
Open analytics to the specific view you want to change. If incorrectly implemented you run the risk of ruining your data, so I highly suggest creating a new (Test View). Go to the Admin Tab, Channel Settings > Channel Grouping.
This page lists all of the channels Google uses by default and any you’ve created. We’ll be adding Dark Social to this list.
Click “Define a new channel” to begin. Name your channel Dark Social, or something less ominous. But how are we going to define these users? We want only people who have a clicked a link from a messaging app. There is no source or medium data from these users, and no clear way to identify them.
While the following two rules aren’t going to capture all dark social users with 100% accuracy, this will still get us enough data to use. As previously described, these users are currently grouped into direct. Our first rule will pull them out of that channel:
Creating the Rules
Set your first rule to “System Defined Channel” matches “Direct”.
The second rule (actually two rules) will grab users who land on a long/complicated URL
These were likely messaged, as there is no way a user typed them. We are going to accidentally grab people who use bookmarks, but that is undoubtedly less than the number of users we lose to not tracking more simple pages, like the homepage.
We won’t include simple URLs like the homepage because it is very likely users are actually typing those in. If someone is messaged a link to just the homepage, they will unfortunately still be grouped under Direct.
The next rule identifies those complicated URLs. You’ll need to adjust this based on how your site’s URL structure is laid out, but mine uses plenty of “-” and “/”. So I’m going to identify landing pages with more than two “-” or more than two “/” anywhere in the URL. The following regular expression rules (without the quotes) will accomplish that:
“Landing Page URL” matches regex “ /.*/.*/ ”
“Landing Page URL” matches regex “ /.*-.*- ”
To test which pages these rules will grab, open any traffic report and analytics and use these rules as page filters.Your page should now look like this (Make sure you clicked “AND” initially and “OR” between the two regexes).
Click Done and Save your changes. Congratulations, you are now tracking dark social! The changes only affect data collection in the future, so come back in a couple days and explore what’s happening under Acquisition > All Traffic > Channels!