For those of us that like to dig around and make things work the way we want, this is great news. One issue that we’ve run into is trying to track the user activity over multiple domains – for example, you have a e-commerce site with loads of products.
You can track all that activity, no problem. But when they go to checkout, they are redirected to a separate domain to process their payment, and all user activity from then on is lost. Enter _linkByPost()
From Google Code:
- This method works in conjunction with the
_setAllowLinker()methods to enable cross-domain user tracking. The
_linkByPost()method passes the cookies from the referring form to another site in a string appended to the action value of the form (HTTP POST). This method is typically used when tracking user behavior from one site to a 3rd-party shopping cart site, but can also be used to send cookie data to other domains in pop-ups or in iFrames.
This is hot.
Other cool tidbits we’ll be experimenting with include:
_setVar() : assign custom variables for users based on site behavior, such as changing preferences to their account after login, etc…
_trackEvent() : this ones great. Ever wonder what the user is doing while watching a video or interacting with some app on your site? Now you can assign event tracking calls to Analytics, like whether they hit play, rewound hit play again, etc…
_trackTrans(): define SKU numbers, item descriptions and categories, price, quantity, etc. for your payment transactions and get Analytics to report it back to you in a way that’s easily understood.
From Google Code:
- Sends both the transaction and item data to the Google Analytics server. This method should be called after
_trackPageview(), and used in conjunction with the
addTrans()methods. It should be called after items and transaction elements have been set up.
I know this is a little “geeky” for some, but the best way to improve conversions is to be able to test everything. Now we can. Thanks Google.