0

I have a web site that several parts are hosted in a different name server. but they are practically the sub parts of the same sites. (i know it's badly designed)

Currently, i get analytics data for each domain. but what i don't like about that is when you are jumping to the other domain, it marks as a drop off. Is there anyway that i could setup analytics in such a way that it treats both domains as a single website?

CoderKK
  • 351
  • 1
  • 7
  • 18

1 Answers1

2

You are looking for cross domain tracking. Google has quite extensive documentation on this. Follow the instructions for Cross Domain Autolinking, manual linking is usually unnecessary and somewhat error prone.

The basic idea is that, since the cookie that stores the client id is domain specific, the id that identifies users must be carried over in some way from one domain to another. This is done by putting it in the url, in a parameter named "ga". If the other domain is configured for cross domain tracking it will take the parameter from the url instead of generating it's own client id. When GA processes the data on the serverside it will recognize that the calls from the different domains (but the same client id) belong to the same session.

Google Analytics (via the autolinking plugin) provides functions that automatically "decorate" links and form, i.e. they add the ga parameter to the links that point to the linked domain, or to form actions. This works well with plain links and forms, but might not always work with javascript callbacks on the links that redirect instead of just following the link.

Eike Pierstorff
  • 31,996
  • 4
  • 43
  • 62