|
f2001fe1c7f77adf8c62789ad7aea913
|
Customize Google Analytics Code?by ssn - Member - 06:33PM, Dec 20, 2007 |
|
Hi, I would like to customize the Google Analytics code to properly work with multiple subdomains (eg. www.example.com and store.example.com) as described here: http://www.google.com/support/googleanalytics/bin/answer.py?answer=55532 It seems that the code “pageTracker._setDomainName(“example.com”)” code is missing. Thanks in advance for any advice, — |
|
|
Can anybody help me or direct me to a more helpful forum? How do you handle websites with different subdomains? One option is to create multiple Analytics accounts. —
|
|
|
Interesting link there; I hadn’t realized there was a way to track two different domains with a single code. I have a single Analytics account, but have several domains in it; so I track my www.example.com and shop.example.com separately through that same account, with each of the domains getting a different Analytics code. Here’s how to track another site through your existing Google Analytics account: 1) Click “Analytics Settings” (top left of page) Step 4 is assuming you’ve got some sort of DNS management which sends “store.example.com” to “example.myshopify.com”. If you’re having difficulty with that you can just tell Google Analytics to use the url “example.myshopify.com”. I have two subdomains, and am using both methods with no problems. It’s somewhat of a hassle to track subdomains separately, because you don’t have a good overview of where your visitors are coming from: if your sites are pretty much integrated, you find yourself switching back and forth between www and store, just to see what’s going on. But it’s a pretty minor inconvenience. The setup is easy.
|
|
|
Thank you Christina for your feedback. Unfortunately it seems that I will have to hack multiple GA aacounts. Although it seems that the “ideal” option is pretty straightforward to implement. Anybody from Shopify care to comment? :)
|
|
|
I’d love to add this but this is the problem i found: We still use their older syntax so you have to click to see the older articles at the top. There are no technical differences between the two apis, just semantics (and the old one is more compact) Their article at http://www.google.com/support/googleanalytics/bin/answer.py?answer=74986 says that _udn=”none” is required when the checkout happens on another domain than the sale. This is true in shopify so i’m thinking that if i replace this with the actual name of the domain it may stop the e-commerce tracking from working. ---
Tobias Lütke
|
|
|
speaking of the different versions, this site has an interesting article saying it is a good idea to migrate to the newer version >> http://www.roirevolution.com/blog/2008/01/should_you_join_the_migration_urchinjs_migrates_to.html the site is a bit of an authority on GA.
|
|
|
Thank you Tobi for the feedback.
|
|
|
Hi Tobi, The word is that any new features introduced into Analytics will require the new code. Already there are new features such as “With the upgrade to ga.js you will have access to several new features including Event Tracking, and Outbound Link Tracking… A few other benefits of the updated ga.js include: Faster, smaller source file – which will allow for a faster download time, Object oriented – instead of using functions, Automatic detection of HTTPS, Increased namespace safety”(from the above article). There are technical differences and it is more than just semantics. Having access to immediate new features, and access to future features as they come available is a pretty compelling reason to upgrade! In the Shopify Admin It would be great to be able to select Old or New analytics. Enter your account details, and then have a field where you can enter extra variables, such as “pageTracker._setDomainName(“example.com”);” to track main domains and sub-domains in one profile, and any other GA variables. (here is a list with all of them http://www.google.com/support/analytics/bin/answer.py?hl=en&;answer=55585 ) Google will eventually kill the old tracking code, so Shopify has to do the switch, so it may as well be sooner rather than later!!! I am all for this as we can have new analytics features and better analyze our shops. Are there any thoughts on adopting this new tracking code and allowing our own analytic variables? Thanks! — Last edited 01:07AM, Feb 09, 2008 |
|
|
Christina said ” if your sites are pretty much integrated, you find yourself switching back and forth between www and store, just to see what’s going on. But it’s a pretty minor inconvenience. The setup is easy.” The big problem is if your shop is shop.domain.com it is impossible to track where your sales are coming from if the majority of your traffic comes to domain.com and then clicks on to shop.domain.com. The analytics account setup for shop.domain.com will list the sale referrer as coming from domain.com, which is pretty much useless. The single best feature of GA is knowing where your sales are coming from, so customizing analytics to be inclusive of domains and subdomains is crucially important! (see here http://www.google.com/support/analytics/bin/answer.py?answer=55524 ) Thanks
|
|
|
oh one last post. (I do love that Shopify is very simple, but just adding an extra field to customize would be great) (upload didn’t go through. will repost) — Last edited 01:26AM, Feb 09, 2008 |
|
|
Sorry server error when I tried to upload just before. Edit – ah i can’t upload without getting a forum error. I used one of those web image uploaders. Here it is:
here is another plugin where you can set everything:
The Shopify options should be as simple as possible, but hint at some extra functionality if needed! — Last edited 01:31AM, Feb 09, 2008 |
|
|
Bump. This is very important for our shop. Understanding where our sales are coming from is critical.
|
|
|
I added the additional scripts field you requested and moved all of shopify to the new GA system. ---
Tobias Lütke
|
|
|
Tobi this is incredible! For other Shopify users, here is what I used this for: I have analytics tracking our website domain.com for the last 18 months. When we launched Shopify we had a new sub-domain at shop.domain.com. To keep using Google Analytics we had to create a new profile, and in order to see how man visitors, referrers, etc we would have to jump back and forth between profiles and never get a full idea of the site traffic. Also, if you have e-commerce tracking setup in GA you can see where your sales are coming from, which is great for marketing purposes! So with Tobi’s change we can now have domain.com and shop.domain.com part of the same GA profile, and get a full idea where our customers are coming from and how they are using our site. So in the Shopify admin, I added this extra code to the GA setup ... and voila! Seamless tracking of my site and Shopify store! Thanks Tobi and Shopify!
|
|
|
Chad: Have you confirmed that this works as expected now? This would be really great news. ---
Tobias Lütke
|
|
|
It usually takes 24 hours for analytics to update, so I’ll have to wait until tomorrow. Also I discovered that there is already a setDomainName attribute, so I don’t know how it will impact things, and I might need to find another solution.
|
|
|
What is the status here? I applied the code but I don’t think data is being collected and reported properly? Chad, what did you find? Thx.
|
|
|
Bump. Ditto: This is very important for our shop. Understanding where our sales are coming from is critical. If Shopify can’t fix this then they need to stop saying that they support GA (http://wiki.shopify.com/How_to_enable_Google_Analytics). We developed with Shopify because they said that they handle GA and ecommerce tracking. We are still having an issue because our Shopify shop is still referring traffic (as per Google Analytics) to our site. We want to be able to track all subdomains for our site in GA. It is especially important that we are able to discern where traffic that goes first to our Shopify shop comes from as we need to track efforts that drive traffic directly to our Shopify shop; for example outside affiliates, etc. I just got a response from Mike at Jaded Pixel about this and find it unacceptable: On Aug 13, 2008, at 2:29 PM, Jaded Pixel wrote: Hello, I had sent this email to Tobi, the Shopify CEO and guru of all things GA, but he was unable to assist. Unfortunately we have no help in this area. Sincerely, Mike Does this inflame anyone else out there??? Doesn’t anyone care about this or are you all willing to use sub-standard GA tracking?
|
|
|
Getting really pissed off about something usually results in a breakthrough for me. Here is what I did: I removed my GA account info from the control panel and I removed the additional GA javascript. This resulted in no GA code on my site. Then I added the “correct” GA code to my template which as you can imagine resulted in the “correct” GA code on my site. I will report back when I find out if this worked.
|


ssn
Member
09:07AM, Jan 08, 2008