I work at a reasonably large e-commerce retailer that's working on doing a lot more with Google Analytics. One of the things we're doing is tagging each individual user that hits our site with a unique ID, and passing it in as a custom dimension to GA. This allows us to get a profile of an individual user, including every traffic source they ever come to our property from, etc. We've hit one snag though.

Imagine a custom report... Dimensions are: Unique ID, Source / Medium, and Date. Metric is hits.

This will show every traffic source that a user's traffic is attributable to, by day. If the user comes in from organic one day, then a referral the next, we'll know about it.

However, the one thing we won't know about is if a user comes from the same source twice in a row. If a user comes from organic twice in a day, we'll just see organic tracked. Ideally, we'd like to know that's two different organic arrivals.

Any ideas on how to tease this out? The end goal is pulling this down into a data warehouse for analysis outside of GA.

(Obviously, I know that this can be done using Multi-Channel Funnels for users that have already made a purchase. But what about those that haven't?)

2 Answers 2


There is a simpler solution to set up the dimension "Date and Time" instead of "Date" which shows more interactions from one unique ID at once. It is not necessary to build another ga script, because GA already collected all data about particular unique id.

  • This is definitely what we ended up going with, and, frankly, I don't know why I even asked this question in the first place? Maybe some of the more fine grained time dimensions weren't available back then? Commented Mar 14, 2017 at 17:43

This is a great question and there are multiple ways it can be done. The cleanest solution I can think of is to send a non-interaction event to Google Analytics that attaches an event to a hit if a user already has a User ID set. This would give you the ability to filter by that event but would not affect bounce rate. I'm obviously not familiar with your implementation but below is a sample of what it would look like:

ga(function(tracker) {
  // grab the User ID
  var userId = tracker.get('userId');
  // if the User ID is not already set, it will return undefined
  if (!userId) {
    // you would set the User ID and whatever else you need to here
    var id = USER_ID;
    ga('create', 'UA-12345678-9', 'auto', { 'userId': id });
    ga('send', 'pageview');
  } else {
    ga('send', {
      hitType: 'event',
      eventCategory: 'Returning Users',
      eventAction: 'Repeat Visit',
      nonInteraction: true
    ga('send', 'pageview');

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.