3

I am using google analytics event tracking to track 2 Facebook canvas application. (they are similar just that one is for production and another is for development). Since they are 2 separate canvas application, both have a different canvas url.

Below is how I setup google analytics:

Property Name : Sample

  1. Main profile (production)
  2. Test profile (development)

Both profiles have the same Tracking ID. How can I track them separately? Do I need to create filters? I am not sure but I might be setting this up wrongly. Do I need to create a separate property name instead?

Appreciate any advice.

John Lee
  • 1,241
  • 2
  • 16
  • 29

2 Answers2

6

Yes, you need to create two separate filters. One that includes pages from your production domain or url, and one for your development domain or url.

Go to

Admin > [all accounts if you have more than one account linked to your GA account] > accounts > [click on specified account] > Filters > New Filter

Filter 1: (development)

Name your filter something descriptive like "production".

If the (sub)domains for your dev vs. prod are different, from the radio buttons/dropdowns, pick

predefined > include only > that are equal to > "dev.yoursite.com" or whatever your dev (sub)domain is.

If the (sub)domains for dev vs prod are the same (but different directory path, pick

predefined > include only > traffic to the subdirectories > that starts with > "path/to/dev/"

highlight the dev profile and click the add button to bring it over to the selected profiles. Click "Save" and you are done with the "development" filter. Now wash rinse and repeat but for your production profile.

With this setup, only data specific to the (sub)domain or directory path will go to your profiles. NOTE: This is not retroactive, any data GA received before you created the filters (even if the data is still in queue and hasn't actually shown up in reports yet) will still show up in your profiles.

CrayonViolent
  • 32,111
  • 5
  • 56
  • 79
  • Sadly, while this works for web pages, this solution doesn't seem like it would work for mobile analytics, since there aren't subdomains in that case. In theory, doesn't the last digit in the tracking id refer to a profile? Why does Google Analytics give the same tracking id for 2 different profiles? – Anton I. Sipos Nov 29 '12 at 03:45
  • @Anton: There are different ways to go about it. You can setup separate accounts (with separate tracking ids) if you want. But creating multiple profiles within a single account is usually the best way to go, especially if you have a lot of sites that build from the same foundation. But more to the point, the OP said he had a single account. The (sub)domains filter was just an example of what can be done to route the data. If you go to the filters, you can see that Google provides a ton of ways to include/exclude data, based on almost any condition you can think of. – CrayonViolent Nov 29 '12 at 14:08
1

You may be better off creating a new Google Analytics tracking ID to separate live production and your dev.

Simply go into GAnalytics Admin, create a new property underneath your already existing Account. Now you will have a new Tracking ID, it should be similar to your original tracking ID, except the last -X digit has incremented.

Now you can track Dev Vs Production in separate properties. We found this very useful when thousands of production users flood the data. Also good when running load tests with thousands of users on Dev, so it doesn't skew your production metrics.

cheers! z

zonabi
  • 746
  • 6
  • 20